add comment and remove unnecessary copy-constructor
parent
7eb5ad67e3
commit
36758a818f
|
@ -48,6 +48,7 @@
|
|||
*/
|
||||
#ifdef __GNUC__
|
||||
#if __GNUC__ >= 7 && __cplusplus >= 201703L
|
||||
// Based on https://github.com/borglab/gtsam/issues/1738, we define U as a complete type.
|
||||
namespace boost { namespace serialization { struct U{}; } }
|
||||
namespace std { template<> struct is_trivially_default_constructible<boost::serialization::U> : std::false_type {}; }
|
||||
namespace std { template<> struct is_trivially_copy_constructible<boost::serialization::U> : std::false_type {}; }
|
||||
|
|
|
@ -60,8 +60,6 @@ public:
|
|||
TestOptionalStruct() = default;
|
||||
TestOptionalStruct(const int& opt)
|
||||
: opt(opt) {}
|
||||
// A copy constructor is needed for serialization
|
||||
TestOptionalStruct(const TestOptionalStruct& other) = default;
|
||||
bool operator==(const TestOptionalStruct& other) const {
|
||||
// check the values are equal
|
||||
return *opt == *other.opt;
|
||||
|
|
Loading…
Reference in New Issue