Hacker News new | ask | show | jobs
by jdrek1 1262 days ago
Copy initialization does not mean that the copy constructor is called. It is the correct term for an expression `T a = ...;`, which can often result in the copy constructor being called but does not have to. In this case it's mandatory copy elision from a prvalue, which leads to only one constructor being called.
1 comments

You are absolutely correct. It turns out "copy initialization is the formal term used. It's kind of stupid IMHO, since it may not be initialization by copying or using a copy of anything, but:

https://en.cppreference.com/w/cpp/language/copy_initializati...

So I half-take-back my comment.