Commit 5992e399 by Paolo Carlini

unordered_map (class __unordered_map, [...]): New.

2007-02-22  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/unordered_map (class __unordered_map,
	class __unordered_multimap): New.
	(class unordered_map, class unordered_multimap): Forward to
	the latter.
	* include/tr1/unordered_set: Likewise for unordered_set and
	unordered_multiset.
	* testsuite/tr1/6_containers/headers/unordered_set/synopsis.cc:
	Remove xfail.
	* testsuite/tr1/6_containers/headers/unordered_map/synopsis.cc:
	Likewise.
	* testsuite/tr1/6_containers/unordered_multimap/requirements/
	explicit_instantiation.cc: Adjust.
	* testsuite/tr1/6_containers/unordered_set/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/tr1/6_containers/unordered_map/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/tr1/6_containers/unordered_multiset/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/tr1/6_containers/unordered_map/24064.cc: Likewise.
	* testsuite/util/native_type/assoc/native_hash_set.hpp: Likewise.
	* testsuite/util/native_type/assoc/native_hash_map.hpp: Likewise.

From-SVN: r122223
parent c00b8d4a
...@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
class _Pred = std::equal_to<_Key>, class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> >, class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
bool __cache_hash_code = false> bool __cache_hash_code = false>
class unordered_map class __unordered_map
: public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, : public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
std::_Select1st<std::pair<const _Key, _Tp> >, _Pred, std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
_Hash, __detail::_Mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
...@@ -71,21 +71,21 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -71,21 +71,21 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typedef typename _Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_map(size_type __n = 10, __unordered_map(size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __detail::_Mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ } { }
template<typename _InputIterator> template<typename _InputIterator>
unordered_map(_InputIterator __f, _InputIterator __l, __unordered_map(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
...@@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
class _Pred = std::equal_to<_Key>, class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> >, class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
bool __cache_hash_code = false> bool __cache_hash_code = false>
class unordered_multimap class __unordered_multimap
: public _Hashtable<_Key, std::pair<const _Key, _Tp>, : public _Hashtable<_Key, std::pair<const _Key, _Tp>,
_Alloc, _Alloc,
std::_Select1st<std::pair<const _Key, _Tp> >, _Pred, std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
...@@ -122,10 +122,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -122,10 +122,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typedef typename _Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_multimap(size_type __n = 10, __unordered_multimap(size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __detail::_Mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
...@@ -133,11 +133,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -133,11 +133,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
template<typename _InputIterator> template<typename _InputIterator>
unordered_multimap(_InputIterator __f, _InputIterator __l, __unordered_multimap(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0, typename _Base::size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
...@@ -147,21 +147,89 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -147,21 +147,89 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc, template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
bool __cache_hash_code> bool __cache_hash_code>
inline void inline void
swap(unordered_map<_Key, _Tp, _Hash, _Pred, swap(__unordered_map<_Key, _Tp, _Hash, _Pred,
_Alloc, __cache_hash_code>& __x, _Alloc, __cache_hash_code>& __x,
unordered_map<_Key, _Tp, _Hash, _Pred, __unordered_map<_Key, _Tp, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y) _Alloc, __cache_hash_code>& __y)
{ __x.swap(__y); } { __x.swap(__y); }
template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc, template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
bool __cache_hash_code> bool __cache_hash_code>
inline void inline void
swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, swap(__unordered_multimap<_Key, _Tp, _Hash, _Pred,
_Alloc, __cache_hash_code>& __x, _Alloc, __cache_hash_code>& __x,
unordered_multimap<_Key, _Tp, _Hash, _Pred, __unordered_multimap<_Key, _Tp, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y) _Alloc, __cache_hash_code>& __y)
{ __x.swap(__y); } { __x.swap(__y); }
template<class _Key, class _Tp,
class _Hash = hash<_Key>,
class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
class unordered_map
: public __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
{
typedef __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
public:
typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal;
typedef typename _Base::allocator_type allocator_type;
explicit
unordered_map(size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __eql, __a)
{ }
template<typename _InputIterator>
unordered_map(_InputIterator __f, _InputIterator __l,
size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
};
template<class _Key, class _Tp,
class _Hash = hash<_Key>,
class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
class unordered_multimap
: public __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
{
typedef __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
public:
typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal;
typedef typename _Base::allocator_type allocator_type;
explicit
unordered_multimap(size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __eql, __a)
{ }
template<typename _InputIterator>
unordered_multimap(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
};
_GLIBCXX_END_NAMESPACE _GLIBCXX_END_NAMESPACE
} }
......
...@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
class _Pred = std::equal_to<_Value>, class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value>, class _Alloc = std::allocator<_Value>,
bool __cache_hash_code = false> bool __cache_hash_code = false>
class unordered_set class __unordered_set
: public _Hashtable<_Value, _Value, _Alloc, : public _Hashtable<_Value, _Value, _Alloc,
std::_Identity<_Value>, _Pred, std::_Identity<_Value>, _Pred,
_Hash, __detail::_Mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
...@@ -71,21 +71,21 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -71,21 +71,21 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typedef typename _Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_set(size_type __n = 10, __unordered_set(size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __detail::_Mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<_Value>(), __a)
{ } { }
template<typename _InputIterator> template<typename _InputIterator>
unordered_set(_InputIterator __f, _InputIterator __l, __unordered_set(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<_Value>(), __a)
...@@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
class _Pred = std::equal_to<_Value>, class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value>, class _Alloc = std::allocator<_Value>,
bool __cache_hash_code = false> bool __cache_hash_code = false>
class unordered_multiset class __unordered_multiset
: public _Hashtable<_Value, _Value, _Alloc, : public _Hashtable<_Value, _Value, _Alloc,
std::_Identity<_Value>, _Pred, std::_Identity<_Value>, _Pred,
_Hash, __detail::_Mod_range_hashing, _Hash, __detail::_Mod_range_hashing,
...@@ -120,10 +120,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -120,10 +120,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typedef typename _Base::allocator_type allocator_type; typedef typename _Base::allocator_type allocator_type;
explicit explicit
unordered_multiset(size_type __n = 10, __unordered_multiset(size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __detail::_Mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<_Value>(), __a)
...@@ -131,11 +131,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -131,11 +131,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
template<typename _InputIterator> template<typename _InputIterator>
unordered_multiset(_InputIterator __f, _InputIterator __l, __unordered_multiset(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0, typename _Base::size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<_Value>(), __a)
...@@ -145,21 +145,89 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -145,21 +145,89 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
template<class _Value, class _Hash, class _Pred, class _Alloc, template<class _Value, class _Hash, class _Pred, class _Alloc,
bool __cache_hash_code> bool __cache_hash_code>
inline void inline void
swap (unordered_set<_Value, _Hash, _Pred, swap (__unordered_set<_Value, _Hash, _Pred,
_Alloc, __cache_hash_code>& __x, _Alloc, __cache_hash_code>& __x,
unordered_set<_Value, _Hash, _Pred, __unordered_set<_Value, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y) _Alloc, __cache_hash_code>& __y)
{ __x.swap(__y); } { __x.swap(__y); }
template<class _Value, class _Hash, class _Pred, class _Alloc, template<class _Value, class _Hash, class _Pred, class _Alloc,
bool __cache_hash_code> bool __cache_hash_code>
inline void inline void
swap(unordered_multiset<_Value, _Hash, _Pred, swap(__unordered_multiset<_Value, _Hash, _Pred,
_Alloc, __cache_hash_code>& __x, _Alloc, __cache_hash_code>& __x,
unordered_multiset<_Value, _Hash, _Pred, __unordered_multiset<_Value, _Hash, _Pred,
_Alloc, __cache_hash_code>& __y) _Alloc, __cache_hash_code>& __y)
{ __x.swap(__y); } { __x.swap(__y); }
template<class _Value,
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value> >
class unordered_set
: public __unordered_set<_Value, _Hash, _Pred, _Alloc>
{
typedef __unordered_set<_Value, _Hash, _Pred, _Alloc> _Base;
public:
typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal;
typedef typename _Base::allocator_type allocator_type;
explicit
unordered_set(size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __eql, __a)
{ }
template<typename _InputIterator>
unordered_set(_InputIterator __f, _InputIterator __l,
size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
};
template<class _Value,
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value> >
class unordered_multiset
: public __unordered_multiset<_Value, _Hash, _Pred, _Alloc>
{
typedef __unordered_multiset<_Value, _Hash, _Pred, _Alloc> _Base;
public:
typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal;
typedef typename _Base::allocator_type allocator_type;
explicit
unordered_multiset(size_type __n = 10,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __eql, __a)
{ }
template<typename _InputIterator>
unordered_multiset(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
};
_GLIBCXX_END_NAMESPACE _GLIBCXX_END_NAMESPACE
} }
......
// { dg-do compile { xfail *-*-* } } // { dg-do compile }
// { dg-excess-errors "" }
// 2007-02-04 Benjamin Kosnik <bkoz@redhat.com> // 2007-02-04 Benjamin Kosnik <bkoz@redhat.com>
// //
......
// { dg-do compile { xfail *-*-* } } // { dg-do compile }
// { dg-excess-errors "" }
// 2007-02-04 Benjamin Kosnik <bkoz@redhat.com> // 2007-02-04 Benjamin Kosnik <bkoz@redhat.com>
// //
......
// Copyright (C) 2005 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -29,7 +29,7 @@ void test01() ...@@ -29,7 +29,7 @@ void test01()
using namespace std; using namespace std;
using namespace tr1; using namespace tr1;
unordered_map<int, char, hash<int>, equal_to<int>, __unordered_map<int, char, hash<int>, equal_to<int>,
allocator<pair<const int, char> >, true> m; allocator<pair<const int, char> >, true> m;
for (int i = 0; i < 1000; ++i) for (int i = 0; i < 1000; ++i)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com> // 2005-02-17 Matt Austern <austern@apple.com>
// //
// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. // Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -29,9 +29,12 @@ using namespace std; ...@@ -29,9 +29,12 @@ using namespace std;
using namespace std::tr1; using namespace std::tr1;
template class unordered_map<string, float>; template class unordered_map<string, float>;
template class unordered_map<string, float, template class unordered_map<string, int,
hash<string>, equal_to<string>, hash<string>, equal_to<string>,
allocator<pair<const string, float> >, true>; allocator<pair<const string, int> > >;
template class unordered_map<string, float, template class unordered_map<string, float,
hash<string>, equal_to<string>, hash<string>, equal_to<string>,
allocator<char>, false>; allocator<char> >;
template class __unordered_map<string, int,
hash<string>, equal_to<string>,
allocator<pair<const string, int> >, true>;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com> // 2005-02-17 Matt Austern <austern@apple.com>
// //
// Copyright (C) 2005, 2006 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -29,9 +29,12 @@ using namespace std; ...@@ -29,9 +29,12 @@ using namespace std;
using namespace std::tr1; using namespace std::tr1;
template class unordered_multimap<string, float>; template class unordered_multimap<string, float>;
template class unordered_multimap<string, float, template class unordered_multimap<string, int,
hash<string>, equal_to<string>, hash<string>, equal_to<string>,
allocator<pair<const string, float> >, true>; allocator<pair<const string, int> > >;
template class unordered_multimap<string, float, template class unordered_multimap<string, float,
hash<string>, equal_to<string>, hash<string>, equal_to<string>,
allocator<char>, false>; allocator<char> >;
template class __unordered_multimap<string, int,
hash<string>, equal_to<string>,
allocator<pair<const string, int> >, true>;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com> // 2005-02-17 Matt Austern <austern@apple.com>
// //
// Copyright (C) 2005, 2006 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -28,7 +28,9 @@ using namespace std; ...@@ -28,7 +28,9 @@ using namespace std;
using namespace std::tr1; using namespace std::tr1;
template class unordered_multiset<int>; template class unordered_multiset<int>;
template class unordered_multiset<float, hash<float>, equal_to<float>,
allocator<float> >;
template class unordered_multiset<int, hash<int>, equal_to<int>, template class unordered_multiset<int, hash<int>, equal_to<int>,
allocator<int>, true>; allocator<char> >;
template class unordered_multiset<int, hash<int>, equal_to<int>, template class __unordered_multiset<float, hash<float>, equal_to<float>,
allocator<char>, false>; allocator<float>, true>;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2005-02-17 Matt Austern <austern@apple.com> // 2005-02-17 Matt Austern <austern@apple.com>
// //
// Copyright (C) 2005, 2006 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -28,7 +28,9 @@ using namespace std; ...@@ -28,7 +28,9 @@ using namespace std;
using namespace std::tr1; using namespace std::tr1;
template class unordered_set<int>; template class unordered_set<int>;
template class unordered_set<float, hash<float>, equal_to<float>,
allocator<float> >;
template class unordered_set<int, hash<int>, equal_to<int>, template class unordered_set<int, hash<int>, equal_to<int>,
allocator<int>, true>; allocator<char> >;
template class unordered_set<int, hash<int>, equal_to<int>, template class __unordered_set<float, hash<float>, equal_to<float>,
allocator<char>, false>; allocator<float>, true>;
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2005, 2006 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 terms // software; you can redistribute it and/or modify it under the terms
...@@ -68,7 +68,7 @@ namespace pb_ds ...@@ -68,7 +68,7 @@ namespace pb_ds
{ {
#ifdef PB_DS_USE_TR1 #ifdef PB_DS_USE_TR1
#define PB_DS_BASE_C_DEC \ #define PB_DS_BASE_C_DEC \
std::tr1::unordered_map<Key, Data, Hash_Fn, Eq_Fn, \ std::tr1::__unordered_map<Key, Data, Hash_Fn, Eq_Fn, \
typename Allocator::template rebind<std::pair<const Key, Data> >::other, Cache_Hash> typename Allocator::template rebind<std::pair<const Key, Data> >::other, Cache_Hash>
#else #else
#define PB_DS_BASE_C_DEC \ #define PB_DS_BASE_C_DEC \
......
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2005, 2006 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 terms // software; you can redistribute it and/or modify it under the terms
...@@ -68,12 +68,12 @@ namespace pb_ds ...@@ -68,12 +68,12 @@ namespace pb_ds
{ {
#ifdef PB_DS_USE_TR1 #ifdef PB_DS_USE_TR1
#define PB_DS_BASE_C_DEC \ #define PB_DS_BASE_C_DEC \
std::tr1::unordered_set<Key, Hash_Fn, Eq_Fn, \ std::tr1::__unordered_set<Key, Hash_Fn, Eq_Fn, \
typename Allocator::template rebind<Key>::other> typename Allocator::template rebind<Key>::other, Cache_Hash>
#else #else
#define PB_DS_BASE_C_DEC \ #define PB_DS_BASE_C_DEC \
__gnu_cxx::hash_set<Key, Hash_Fn, Eq_Fn, \ __gnu_cxx::hash_set<Key, Hash_Fn, Eq_Fn, \
typename Allocator::template rebind<Key>::other> typename Allocator::template rebind<Key>::other>
#endif #endif
template<typename Key, template<typename Key,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment