diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-06-08 17:43:14 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-06-08 17:43:14 +0100 |
commit | a14175560cca5da1f9ff776c5c7309473397d43d (patch) | |
tree | b4f7b600f85d721994a50cf2134624619d3c6521 /libstdc++-v3/include/std/complex | |
parent | 29a50dfb47ff12c7730a3d604642ce500a39c78f (diff) | |
download | gcc-a14175560cca5da1f9ff776c5c7309473397d43d.tar.gz |
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<float>::complex(const complex&))
(complex<double>::complex(const complex&))
(complex<long double>::complex(const complex&)): Likewise.
From-SVN: r261338
Diffstat (limited to 'libstdc++-v3/include/std/complex')
-rw-r--r-- | libstdc++-v3/include/std/complex | 12 |
1 files changed, 9 insertions, 3 deletions
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<typename _Tp> 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<typename _Tp> 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<typename _Tp> complex& |