diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-04-25 09:42:46 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-04-25 09:42:46 +0000 |
commit | 03d7aff6ee94f302ea87255a89f8f3686085ed03 (patch) | |
tree | c259932e0323ae5053034c49d3ebc494549893e9 | |
parent | 1ef395e461dd47b7d985c074a9f9ad6b399acc1d (diff) | |
download | gcc-03d7aff6ee94f302ea87255a89f8f3686085ed03.zip gcc-03d7aff6ee94f302ea87255a89f8f3686085ed03.tar.gz gcc-03d7aff6ee94f302ea87255a89f8f3686085ed03.tar.bz2 |
re PR libstdc++/57065 (incorrect default allocator template for debug and profile unordered_map)
2013-04-25 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/57065
* include/debug/unordered_map (unordered_map, unordered_multimap):
Fix default allocator type.
* include/profile/unordered_map (unordered_map, unordered_multimap):
Likewise.
* include/bits/unordered_map.h: Fix comments.
From-SVN: r198279
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/unordered_map.h | 26 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/unordered_map | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/profile/unordered_map | 8 |
4 files changed, 29 insertions, 18 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 364e67b..5846019 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2013-04-25 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/57065 + * include/debug/unordered_map (unordered_map, unordered_multimap): + Fix default allocator type. + * include/profile/unordered_map (unordered_map, unordered_multimap): + Likewise. + * include/bits/unordered_map.h: Fix comments. + 2013-04-24 Jonathan Wakely <jwakely.gcc@gmail.com> PR libstdc++/56905 diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h index 7fd84e3..22a5166 100644 --- a/libstdc++-v3/include/bits/unordered_map.h +++ b/libstdc++-v3/include/bits/unordered_map.h @@ -75,12 +75,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * @ingroup unordered_associative_containers * - * @tparam _Key Type of key objects. - * @tparam _Tp Type of mapped objects. - * @tparam _Hash Hashing function object type, defaults to hash<_Value>. - * @tparam _Pred Predicate function object type, defaults - * to equal_to<_Value>. - * @tparam _Alloc Allocator type, defaults to allocator<_Key>. + * @tparam _Key Type of key objects. + * @tparam _Tp Type of mapped objects. + * @tparam _Hash Hashing function object type, defaults to hash<_Value>. + * @tparam _Pred Predicate function object type, defaults + * to equal_to<_Value>. + * @tparam _Alloc Allocator type, defaults to + * std::allocator<std::pair<const _Key, _Tp>>. * * Meets the requirements of a <a href="tables.html#65">container</a>, and * <a href="tables.html#xx">unordered associative container</a> @@ -786,12 +787,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * @ingroup unordered_associative_containers * - * @tparam _Key Type of key objects. - * @tparam _Tp Type of mapped objects. - * @tparam _Hash Hashing function object type, defaults to hash<_Value>. - * @tparam _Pred Predicate function object type, defaults - * to equal_to<_Value>. - * @tparam _Alloc Allocator type, defaults to allocator<_Key>. + * @tparam _Key Type of key objects. + * @tparam _Tp Type of mapped objects. + * @tparam _Hash Hashing function object type, defaults to hash<_Value>. + * @tparam _Pred Predicate function object type, defaults + * to equal_to<_Value>. + * @tparam _Alloc Allocator type, defaults to + * std::allocator<std::pair<const _Key, _Tp>>. * * Meets the requirements of a <a href="tables.html#65">container</a>, and * <a href="tables.html#xx">unordered associative container</a> diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index d62deac..cbde903 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -46,7 +46,7 @@ namespace __debug template<typename _Key, typename _Tp, typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, - typename _Alloc = std::allocator<_Key> > + typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class unordered_map : public _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>, public __gnu_debug::_Safe_unordered_container<unordered_map<_Key, _Tp, @@ -500,7 +500,7 @@ namespace __debug template<typename _Key, typename _Tp, typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, - typename _Alloc = std::allocator<_Key> > + typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class unordered_multimap : public _GLIBCXX_STD_C::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>, diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index 0fee176..f594ab8 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -44,9 +44,9 @@ namespace __profile { /// Class std::unordered_map wrapper with performance instrumentation. template<typename _Key, typename _Tp, - typename _Hash = std::hash<_Key>, + typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, - typename _Alloc = std::allocator<_Key> > + typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class unordered_map : public _GLIBCXX_STD_BASE { @@ -346,9 +346,9 @@ namespace __profile /// Class std::unordered_multimap wrapper with performance instrumentation. template<typename _Key, typename _Tp, - typename _Hash = std::hash<_Key>, + typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, - typename _Alloc = std::allocator<_Key> > + typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class unordered_multimap : public _GLIBCXX_STD_BASE { |