Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc/dist/libstdc++-v3/include/bits Provide cop...
details: https://anonhg.NetBSD.org/src/rev/e4ed03b4879e
branches: trunk
changeset: 782595:e4ed03b4879e
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Nov 08 11:24:00 2012 +0000
description:
Provide copy constructor and copy assignment operators for C++11.
Clang implements the C++11 semantics properly that require the default
to be implicitly deleted.
diffstat:
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_pair.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diffs (28 lines):
diff -r 57fae7cd6ac2 -r e4ed03b4879e external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_pair.h
--- a/external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_pair.h Thu Nov 08 08:46:26 2012 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_pair.h Thu Nov 08 11:24:00 2012 +0000
@@ -107,6 +107,9 @@
pair(_U1&& __x, _U2&& __y)
: first(std::forward<_U1>(__x)),
second(std::forward<_U2>(__y)) { }
+
+ pair(const pair &) = default;
+ pair(pair &&) = default;
#endif
/** There is also a templated copy ctor for the @c pair class itself. */
@@ -122,6 +125,14 @@
second(std::forward<_U2>(__p.second)) { }
pair&
+ operator=(const pair& __p)
+ {
+ first = __p.first;
+ second = __p.second;
+ return *this;
+ }
+
+ pair&
operator=(pair&& __p)
{
first = std::move(__p.first);
Home |
Main Index |
Thread Index |
Old Index