What changes to C++ made copy initialization work for class with explicit constructor?
Because the behavior of copy elision changes from C++17; for this case copy elision is mandatory. Mandatory elision of copy/move operations Under the following circumstances, the compilers are required to omit the copy and move construction of class objects, even if the copy/move constructor and the destructor have observable side-effects. The objects are constructed directly … Read more