boostorg / serialization

Boost.org serialization module
http://boost.org/libs/serialization
119 stars 139 forks source link

Declare non-ODR-used copy constructor #280

Closed ecatmur closed 1 year ago

ecatmur commented 1 year ago

The compiler-generated copy constructor is deprecated since C++11 on classes with user-declared copy assignment operator.

This change allows clean compilation with the -Wdeprecated-copy/-Wdeprecated-copy-with-user-provided-ctor flag.

robertramey commented 1 year ago

Did you actually test this? Library fails to compile after marging this change:

boost::archive::xml::assign_impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) in xml_grammar.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ecatmur commented 1 year ago

Did you actually test this? Library fails to compile after marging this change:

boost::archive::xml::assign_impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) in xml_grammar.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Apparently not, sorry. Not sure how that got through. #297 for the correct fix.