I do not know what SC was considering, but keep in mind that uniform initialization does not really work in general contexts (prohibition of cost construction *). Consider this attempt:
template<typename T, typename... Args> T make(Args&&... args) { return T { std::forward<Args>(args)... }; }
You get:
assert( make<std::vector<int>>(10, 0).size() == 2 ); assert( std::vector<int>(10, 0).size() == 10 );
and this will not compile:
make<std::vector<int*>>(10u, 0);
then how it does:
std::vector<int*>(10u, 0);
If the specific interaction between the ideal forwarder and initializer lists that causes this was formed soon enough, I could see that SC did not want to restart from scratch.
(*): T {} excellent even in general contexts.
Luc Danton Oct 19 '11 at 11:02 2011-10-19 11:02
source share