The standard says that the implicit copy assignment operator is
deprecated for classes that have a user-provided copy constructor, and
vice versa.
libstdc++-v3/ChangeLog:
* include/bits/new_allocator.h (__new_allocator): Define copy
assignment operator as defaulted.
* include/std/complex (complex<float>, complex<double>)
(complex<long double>): Define copy constructor as defaulted.
(cherry picked from commit
008e439f34d4b356825a6c9b70245143f00bd353)
_GLIBCXX20_CONSTEXPR
__new_allocator(const __new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { }
+#if __cplusplus >= 201103L
+ __new_allocator& operator=(const __new_allocator&) = default;
+#endif
+
#if __cplusplus <= 201703L
~__new_allocator() _GLIBCXX_USE_NOEXCEPT { }
}
#endif
+#if __cplusplus >= 201103L
+ _GLIBCXX14_CONSTEXPR complex(const complex&) = default;
+#endif
+
explicit _GLIBCXX_CONSTEXPR complex(const complex<double>&);
explicit _GLIBCXX_CONSTEXPR complex(const complex<long double>&);
}
#endif
+#if __cplusplus >= 201103L
+ _GLIBCXX14_CONSTEXPR complex(const complex&) = default;
+#endif
+
_GLIBCXX_CONSTEXPR complex(const complex<float>& __z)
: _M_value(__z.__rep()) { }
}
#endif
+#if __cplusplus >= 201103L
+ _GLIBCXX14_CONSTEXPR complex(const complex&) = default;
+#endif
+
_GLIBCXX_CONSTEXPR complex(const complex<float>& __z)
: _M_value(__z.__rep()) { }