2 ms·
There's a proposal to fix the 'foo' case but, as an outsider, it's unclear whether it will be fixed in time for C++14. [0] The vector case is unfortunate, but
by nly 13y ago
There's a proposal to fix the 'foo' case but, as an outsider, it's unclear whether it will be fixed in time for C++14. [0]
The vector case is unfortunate, but I'd personally argue the defect is in the vector class. There's no significant performance advantage, that I can see, to the (n, T) construction over a default construction followed by v.resize(n, T).
[0] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n392...