Open ecatmur opened 1 year ago
is this redundant? In C++03? An alternative approach would be to define the copy-assignment operator.
Yes, this is Note 113 in C++03:
113) Because a template constructor is never a copy constructor, the presence of such a template does not suppress the implicit declaration of a copy constructor. Template constructors participate in overload resolution with other constructors, including copy constructors, and a template constructor may be used to copy an object if it provides a better match than other constructors.
I can add the copy assignment operator if you'd prefer.
Since C++11, a user-declared copy constructor deprecates the copy assignment operator.
This change allows clean compilation with the -Wdeprecated-copy/-Wdeprecated-copy-with-user-provided-ctor flag.