summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/debug
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 20:08:20 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 20:08:20 +0000
commit8f1514645d3a84ba87072b81adebecf542d08fe1 (patch)
tree9d1ffb6717b8ccecd48672b9346daff8cbf42aaa /libstdc++-v3/include/debug
parent460ea83ee4307a0867beddf8845627f331e12a24 (diff)
downloadppe42-gcc-8f1514645d3a84ba87072b81adebecf542d08fe1.tar.gz
ppe42-gcc-8f1514645d3a84ba87072b81adebecf542d08fe1.zip
PR libstdc++/59548
* include/debug/safe_base.h (_Safe_sequence_base): Define copy constructor to prevent it being implicitly defined as deleted, but do not copy anything. * include/debug/safe_unordered_base.h (_Safe_unordered_container_base): Define copy and move constructors similar to _Safe_sequence_base's. * testsuite/23_containers/unordered_map/59548.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207059 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug')
-rw-r--r--libstdc++-v3/include/debug/safe_base.h3
-rw-r--r--libstdc++-v3/include/debug/safe_unordered_base.h12
2 files changed, 14 insertions, 1 deletions
diff --git a/libstdc++-v3/include/debug/safe_base.h b/libstdc++-v3/include/debug/safe_base.h
index 4b1d082d264..631ac773ddb 100644
--- a/libstdc++-v3/include/debug/safe_base.h
+++ b/libstdc++-v3/include/debug/safe_base.h
@@ -193,6 +193,9 @@ namespace __gnu_debug
{ }
#if __cplusplus >= 201103L
+ _Safe_sequence_base(const _Safe_sequence_base&) noexcept
+ : _Safe_sequence_base() { }
+
_Safe_sequence_base(_Safe_sequence_base&& __x) noexcept
: _Safe_sequence_base()
{ _M_swap(__x); }
diff --git a/libstdc++-v3/include/debug/safe_unordered_base.h b/libstdc++-v3/include/debug/safe_unordered_base.h
index 9cde781364c..bbb274f34e4 100644
--- a/libstdc++-v3/include/debug/safe_unordered_base.h
+++ b/libstdc++-v3/include/debug/safe_unordered_base.h
@@ -133,9 +133,19 @@ namespace __gnu_debug
protected:
// Initialize with a version number of 1 and no iterators
_Safe_unordered_container_base()
- : _M_local_iterators(0), _M_const_local_iterators(0)
+ : _M_local_iterators(nullptr), _M_const_local_iterators(nullptr)
{ }
+ // Initialize with a version number of 1 and no iterators
+ _Safe_unordered_container_base(const _Safe_unordered_container_base&)
+ noexcept
+ : _Safe_unordered_container_base() { }
+
+ _Safe_unordered_container_base(_Safe_unordered_container_base&& __x)
+ noexcept
+ : _Safe_unordered_container_base()
+ { this->_M_swap(__x); }
+
/** Notify all iterators that reference this container that the
container is being destroyed. */
~_Safe_unordered_container_base()
OpenPOWER on IntegriCloud