Copy elision when creating object inside emplace()

后端 未结 4 851
无人共我
无人共我 2021-02-12 19:00

I see a lot of code at work where people use emplace and emplace_back with a temporary object, like this:

struct A {
    A::A(int, int);
};

vector v;
v         


        
4条回答
提交回复
热议问题