Is this just an oversight?
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std...@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
push_back already does perfect forwarding of any set of arguments to
the type constructor, so there is no need to add an overload is there?
You are thinking of emplace_back, but that's not what I'm referring
too:
vector<int> v;
v.insert(v.end(), {1,2,3,4}); // ok
v.push_back({1,2,3,4}); // not ok
Sean
I'm talking of the new push_back with placement insert support as
defined in N2345.
I can't find an emplace_back, be it in N2345 or N3000.
Unfortunately, it seems the working paper doesn't have the
enhancements as exposed in N2345. Anyone knows why that is, even
though the status of the paper says integrated into the working paper?
Ah, I see. Those were renamed to emplace_front() and emplace_back(),
which is in Table 95 of n3000. The difference between emplacement and
initializer list insertion is that an emplacement only adds a single
element; an initializer list insertion inserts a number of elements,
and I do not see why the same should not extend to push_back() or
push_front().
Sean