diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-16 09:20:34 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-16 09:20:34 +0000 |
commit | 17ae7f11546e1ce8bec4e4ec71ccb59891ad19cc (patch) | |
tree | 09d17ad81858e565dc037a69cf4b591e41101256 /libstdc++-v3/include/profile | |
parent | 31fd081da3d7a8b1184013bf5f9ad06e1ee02462 (diff) | |
download | gcc-17ae7f11546e1ce8bec4e4ec71ccb59891ad19cc.tar.gz |
PR libstdc++/55043
* include/std/unordered_map: Include alloc_traits.h
* include/std/unordered_set: Likewise.
* include/bits/alloc_traits.h: Define __is_copy_insertable.
* include/bits/unordered_map.h: Use it.
* include/bits/unordered_set.h: Likewise.
* include/debug/unordered_map.h: Likewise.
* include/debug/unordered_set.h: Likewise.
* include/profile/unordered_map.h: Likewise.
* include/profile/unordered_set.h: Likewise.
* include/bits/hashtable.h: Fix comment typos.
* testsuite/23_containers/unordered_map/55043.cc: New.
* testsuite/23_containers/unordered_multimap/55043.cc: New.
* testsuite/23_containers/unordered_multiset/55043.cc: New.
* testsuite/23_containers/unordered_set/55043.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195231 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/profile')
-rw-r--r-- | libstdc++-v3/include/profile/unordered_map | 28 | ||||
-rw-r--r-- | libstdc++-v3/include/profile/unordered_set | 25 |
2 files changed, 51 insertions, 2 deletions
diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index e7b4c379ac4..5ebcbf60fcb 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -1,6 +1,6 @@ // Profiling unordered_map/unordered_multimap implementation -*- C++ -*- -// Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +// Copyright (C) 2009-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -339,11 +339,25 @@ namespace __profile const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) { return !(__x == __y); } +} // namespace __profile + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template<typename _Key, typename _Tp, typename _Hash, typename _Pred, + typename _Alloc> + struct + is_copy_constructible<__profile::unordered_map<_Key, _Tp, _Hash, + _Pred, _Alloc>> + : is_copy_constructible< _GLIBCXX_STD_BASE > + { }; +_GLIBCXX_END_NAMESPACE_VERSION + #undef _GLIBCXX_BASE #undef _GLIBCXX_STD_BASE #define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> #define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE +namespace __profile +{ /// Class std::unordered_multimap wrapper with performance instrumentation. template<typename _Key, typename _Tp, typename _Hash = std::hash<_Key>, @@ -609,6 +623,18 @@ namespace __profile { return !(__x == __y); } } // namespace __profile + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template<typename _Key, typename _Tp, typename _Hash, typename _Pred, + typename _Alloc> + struct + is_copy_constructible<__profile::unordered_multimap<_Key, _Tp, _Hash, + _Pred, _Alloc>> + : is_copy_constructible< _GLIBCXX_STD_BASE > + { }; + +_GLIBCXX_END_NAMESPACE_VERSION } // namespace std #undef _GLIBCXX_BASE diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index 357c073feaa..ebe1c7d6f12 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -1,6 +1,6 @@ // Profiling unordered_set/unordered_multiset implementation -*- C++ -*- -// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 2009-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -305,11 +305,23 @@ namespace __profile const unordered_set<_Key, _Hash, _Pred, _Alloc>& __y) { return !(__x == __y); } +} // namespace __profile + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template<typename _Key, typename _Hash, typename _Pred, typename _Alloc> + struct + is_copy_constructible<__profile::unordered_set<_Key, _Hash, _Pred, _Alloc>> + : is_copy_constructible< _GLIBCXX_STD_BASE > + { }; +_GLIBCXX_END_NAMESPACE_VERSION + #undef _GLIBCXX_BASE #undef _GLIBCXX_STD_BASE #define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE #define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc> +namespace __profile +{ /** @brief Unordered_multiset wrapper with performance instrumentation. */ template<typename _Value, typename _Hash = std::hash<_Value>, @@ -568,6 +580,17 @@ namespace __profile { return !(__x == __y); } } // namespace __profile + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> + struct + is_copy_constructible<__profile::unordered_multiset<_Value, _Hash, + _Pred, _Alloc>> + : is_copy_constructible< _GLIBCXX_STD_BASE > + { }; + +_GLIBCXX_END_NAMESPACE_VERSION } // namespace std #undef _GLIBCXX_BASE |