From a14175560cca5da1f9ff776c5c7309473397d43d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 8 Jun 2018 17:43:14 +0100 Subject: Define special members as defaulted * include/bits/ios_base.h (ios::Init::Init(const Init&)) (ios::Init::operator=): Define as defaulted. * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)): Likewise. * include/bits/stream_iterator.h (istream_iterator::operator=) (ostream_iterator::operator=): Likewise. * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=) Likewise. * include/std/bitset (bitset::reference::reference(const reference&)): Likewise. * include/std/complex (complex::complex(const complex&)) (complex::complex(const complex&)) (complex::complex(const complex&)): Likewise. From-SVN: r261338 --- libstdc++-v3/include/std/complex | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libstdc++-v3/include/std/complex') diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 2e2c2c06560..2d1cc1831d0 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -1158,7 +1158,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Let the compiler synthesize the copy and assignment // operator. It always does a pretty good job. - // complex& operator=(const complex&); +#if __cplusplus >= 201103L + _GLIBCXX14_CONSTEXPR complex& operator=(const complex&) = default; +#endif template complex& @@ -1308,7 +1310,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // The compiler will synthesize this, efficiently. - // complex& operator=(const complex&); +#if __cplusplus >= 201103L + _GLIBCXX14_CONSTEXPR complex& operator=(const complex&) = default; +#endif template complex& @@ -1460,7 +1464,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // The compiler knows how to do this efficiently - // complex& operator=(const complex&); +#if __cplusplus >= 201103L + _GLIBCXX14_CONSTEXPR complex& operator=(const complex&) = default; +#endif template complex& -- cgit v1.2.1