From a1252fcc0e86617fb5ae8183cf31e1edb47e3ee1 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 30 Nov 2009 18:25:26 +0000 Subject: [PATCH] Use consistent names for template parameters. I'm trying to fix the codegear ICEs, but it's hard to tell the cause. Since the error happens operator== I suspect it's either to do with defining friend functions with different template names or something to do with friend functions in general. This is the first stab in the dark at fixing this. [SVN r58062] --- include/boost/unordered/unordered_map.hpp | 40 +++++++++---------- include/boost/unordered/unordered_map_fwd.hpp | 16 ++++---- include/boost/unordered/unordered_set.hpp | 40 +++++++++---------- include/boost/unordered/unordered_set_fwd.hpp | 16 ++++---- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index 00c27ef8..10d72829 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -38,16 +38,16 @@ namespace boost { - template + template class unordered_map { public: - typedef Key key_type; - typedef std::pair value_type; + typedef K key_type; + typedef std::pair value_type; typedef T mapped_type; - typedef Hash hasher; - typedef Pred key_equal; - typedef Alloc allocator_type; + typedef H hasher; + typedef P key_equal; + typedef A allocator_type; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) private: @@ -58,7 +58,7 @@ namespace boost allocator_type, value_type>::type value_allocator; - typedef boost::unordered_detail::map types; typedef BOOST_DEDUCED_TYPENAME types::impl table; @@ -177,7 +177,7 @@ namespace boost } #else unordered_map(boost::unordered_detail::move_from< - unordered_map + unordered_map > other) : table_(other.source.table_, boost::unordered_detail::move_tag()) { @@ -513,9 +513,9 @@ namespace boost } #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) - friend bool operator==( + friend bool operator==( unordered_map const&, unordered_map const&); - friend bool operator!=( + friend bool operator!=( unordered_map const&, unordered_map const&); #endif }; // class template unordered_map @@ -541,17 +541,17 @@ namespace boost m1.swap(m2); } - template + template class unordered_multimap { public: - typedef Key key_type; - typedef std::pair value_type; + typedef K key_type; + typedef std::pair value_type; typedef T mapped_type; - typedef Hash hasher; - typedef Pred key_equal; - typedef Alloc allocator_type; + typedef H hasher; + typedef P key_equal; + typedef A allocator_type; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) private: @@ -562,7 +562,7 @@ namespace boost allocator_type, value_type>::type value_allocator; - typedef boost::unordered_detail::multimap types; typedef BOOST_DEDUCED_TYPENAME types::impl table; @@ -682,7 +682,7 @@ namespace boost } #else unordered_multimap(boost::unordered_detail::move_from< - unordered_multimap + unordered_multimap > other) : table_(other.source.table_, boost::unordered_detail::move_tag()) { @@ -1002,9 +1002,9 @@ namespace boost } #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) - friend bool operator==( + friend bool operator==( unordered_multimap const&, unordered_multimap const&); - friend bool operator!=( + friend bool operator!=( unordered_multimap const&, unordered_multimap const&); #endif }; // class template unordered_multimap diff --git a/include/boost/unordered/unordered_map_fwd.hpp b/include/boost/unordered/unordered_map_fwd.hpp index bbd81627..5e9bb076 100644 --- a/include/boost/unordered/unordered_map_fwd.hpp +++ b/include/boost/unordered/unordered_map_fwd.hpp @@ -17,11 +17,11 @@ namespace boost { - template , - class Pred = std::equal_to, - class Alloc = std::allocator > > + class H = hash, + class P = std::equal_to, + class A = std::allocator > > class unordered_map; template bool operator==(unordered_map const&, @@ -33,11 +33,11 @@ namespace boost void swap(unordered_map&, unordered_map&); - template , - class Pred = std::equal_to, - class Alloc = std::allocator > > + class H = hash, + class P = std::equal_to, + class A = std::allocator > > class unordered_multimap; template bool operator==(unordered_multimap const&, diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index 26c5090a..f2af28af 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -38,16 +38,16 @@ namespace boost { - template + template class unordered_set { public: - typedef Value key_type; - typedef Value value_type; - typedef Hash hasher; - typedef Pred key_equal; - typedef Alloc allocator_type; + typedef T key_type; + typedef T value_type; + typedef H hasher; + typedef P key_equal; + typedef A allocator_type; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) private: @@ -58,7 +58,7 @@ namespace boost allocator_type, value_type>::type value_allocator; - typedef boost::unordered_detail::set types; typedef BOOST_DEDUCED_TYPENAME types::impl table; @@ -171,7 +171,7 @@ namespace boost } #else unordered_set(boost::unordered_detail::move_from< - unordered_set + unordered_set > other) : table_(other.source.table_, boost::unordered_detail::move_tag()) { @@ -478,9 +478,9 @@ namespace boost } #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) - friend bool operator==( + friend bool operator==( unordered_set const&, unordered_set const&); - friend bool operator!=( + friend bool operator!=( unordered_set const&, unordered_set const&); #endif }; // class template unordered_set @@ -506,16 +506,16 @@ namespace boost m1.swap(m2); } - template + template class unordered_multiset { public: - typedef Value key_type; - typedef Value value_type; - typedef Hash hasher; - typedef Pred key_equal; - typedef Alloc allocator_type; + typedef T key_type; + typedef T value_type; + typedef H hasher; + typedef P key_equal; + typedef A allocator_type; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) private: @@ -526,7 +526,7 @@ namespace boost allocator_type, value_type>::type value_allocator; - typedef boost::unordered_detail::multiset types; typedef BOOST_DEDUCED_TYPENAME types::impl table; @@ -640,7 +640,7 @@ namespace boost } #else unordered_multiset(boost::unordered_detail::move_from< - unordered_multiset + unordered_multiset > other) : table_(other.source.table_, boost::unordered_detail::move_tag()) { @@ -943,9 +943,9 @@ namespace boost } #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) - friend bool operator==( + friend bool operator==( unordered_multiset const&, unordered_multiset const&); - friend bool operator!=( + friend bool operator!=( unordered_multiset const&, unordered_multiset const&); #endif }; // class template unordered_multiset diff --git a/include/boost/unordered/unordered_set_fwd.hpp b/include/boost/unordered/unordered_set_fwd.hpp index 6b3f74e7..8000eb14 100644 --- a/include/boost/unordered/unordered_set_fwd.hpp +++ b/include/boost/unordered/unordered_set_fwd.hpp @@ -17,10 +17,10 @@ namespace boost { - template , - class Pred = std::equal_to, - class Alloc = std::allocator > + template , + class P = std::equal_to, + class A = std::allocator > class unordered_set; template bool operator==(unordered_set const&, @@ -32,10 +32,10 @@ namespace boost void swap(unordered_set &m1, unordered_set &m2); - template , - class Pred = std::equal_to, - class Alloc = std::allocator > + template , + class P = std::equal_to, + class A = std::allocator > class unordered_multiset; template bool operator==(unordered_multiset const&,