On 2015-09-20 15:15, Sui Huang wrote:
> #3. vector<HasPtr> items = {HasPtr("abc"), HasPtr("def")}; //first call default constructor, then copy constructor
> [...]
> #3. When copy objects to vector, why not call move constructor?
Initializer lists don't support move, the elements can only be accessed
as const and thus must be copied.
There is a proposal to support move, so this may be possible in C++17.