Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71346 - trunk/boost/unordered/detail
From: dnljms_at_[hidden]
Date: 2011-04-16 20:31:36


Author: danieljames
Date: 2011-04-16 20:31:35 EDT (Sat, 16 Apr 2011)
New Revision: 71346
URL: http://svn.boost.org/trac/boost/changeset/71346

Log:
Unordered: fix some gcc issues.

Text files modified:
   trunk/boost/unordered/detail/buckets.hpp | 28 +++++++++++++---------------
   trunk/boost/unordered/detail/equivalent.hpp | 18 +++++++++---------
   trunk/boost/unordered/detail/table.hpp | 14 +++++++-------
   trunk/boost/unordered/detail/unique.hpp | 18 +++++++++---------
   4 files changed, 38 insertions(+), 40 deletions(-)

Modified: trunk/boost/unordered/detail/buckets.hpp
==============================================================================
--- trunk/boost/unordered/detail/buckets.hpp (original)
+++ trunk/boost/unordered/detail/buckets.hpp 2011-04-16 20:31:35 EDT (Sat, 16 Apr 2011)
@@ -15,7 +15,7 @@
     //
     // Now the main data structure:
     //
- // buckets<A, Unique> buffered_functions<H, P>
+ // buckets<A, Unique> functions<H, P>
     // | |
     // +---------------+--------------+
     // |
@@ -323,10 +323,10 @@
     template <class H, class P> class set_hash_functions;
 
     template <class H, class P>
- class buffered_functions
+ class functions
     {
         friend class set_hash_functions<H, P>;
- buffered_functions& operator=(buffered_functions const&);
+ functions& operator=(functions const&);
 
         typedef ::boost::compressed_pair<H, P> function_pair;
         typedef BOOST_DEDUCED_TYPENAME ::boost::aligned_storage<
@@ -358,19 +358,19 @@
         
     public:
 
- buffered_functions(H const& hf, P const& eq)
+ functions(H const& hf, P const& eq)
             : current_(false)
         {
             construct(current_, hf, eq);
         }
 
- buffered_functions(buffered_functions const& bf)
+ functions(functions const& bf)
             : current_(false)
         {
             construct(current_, bf.current());
         }
 
- ~buffered_functions() {
+ ~functions() {
             destroy(current_);
         }
 
@@ -389,22 +389,20 @@
         set_hash_functions(set_hash_functions const&);
         set_hash_functions& operator=(set_hash_functions const&);
     
- typedef buffered_functions<H, P> buffered_functions;
- buffered_functions& buffered_functions_;
+ functions<H,P>& functions_;
         bool tmp_functions_;
 
     public:
 
- set_hash_functions(buffered_functions& f, H const& h, P const& p)
- : buffered_functions_(f),
+ set_hash_functions(functions<H,P>& f, H const& h, P const& p)
+ : functions_(f),
             tmp_functions_(!f.current_)
         {
             f.construct(tmp_functions_, h, p);
         }
 
- set_hash_functions(buffered_functions& f,
- buffered_functions const& other)
- : buffered_functions_(f),
+ set_hash_functions(functions<H,P>& f, functions<H,P> const& other)
+ : functions_(f),
             tmp_functions_(!f.current_)
         {
             f.construct(tmp_functions_, other.current());
@@ -412,12 +410,12 @@
 
         ~set_hash_functions()
         {
- buffered_functions_.destroy(tmp_functions_);
+ functions_.destroy(tmp_functions_);
         }
 
         void commit()
         {
- buffered_functions_.current_ = tmp_functions_;
+ functions_.current_ = tmp_functions_;
             tmp_functions_ = !tmp_functions_;
         }
     };

Modified: trunk/boost/unordered/detail/equivalent.hpp
==============================================================================
--- trunk/boost/unordered/detail/equivalent.hpp (original)
+++ trunk/boost/unordered/detail/equivalent.hpp 2011-04-16 20:31:35 EDT (Sat, 16 Apr 2011)
@@ -12,7 +12,7 @@
 namespace boost { namespace unordered { namespace detail {
 
     template <class T>
- class equivalent_table : public T::table
+ class equivalent_table : public T::table_base
     {
     public:
         typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
@@ -20,7 +20,7 @@
         typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
         typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
         typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME T::table table;
+ typedef BOOST_DEDUCED_TYPENAME T::table_base table_base;
         typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
 
         typedef BOOST_DEDUCED_TYPENAME T::node node;
@@ -32,17 +32,17 @@
 
         equivalent_table(std::size_t n,
             hasher const& hf, key_equal const& eq, value_allocator const& a)
- : table(n, hf, eq, a) {}
+ : table_base(n, hf, eq, a) {}
         equivalent_table(equivalent_table const& x)
- : table(x, x.node_alloc()) {}
+ : table_base(x, x.node_alloc()) {}
         equivalent_table(equivalent_table const& x,
             value_allocator const& a)
- : table(x, a) {}
+ : table_base(x, a) {}
         equivalent_table(equivalent_table& x, move_tag m)
- : table(x, m) {}
+ : table_base(x, m) {}
         equivalent_table(equivalent_table& x,
             value_allocator const& a, move_tag m)
- : table(x, a, m) {}
+ : table_base(x, a, m) {}
         ~equivalent_table() {}
 
         // Equality
@@ -237,7 +237,7 @@
         false>
     {
         typedef equivalent_table<multiset<H, P, A> > impl;
- typedef table<multiset<H, P, A> > table;
+ typedef table<multiset<H, P, A> > table_base;
     };
 
     template <class K, class H, class P, class A>
@@ -248,7 +248,7 @@
         false>
     {
         typedef equivalent_table<multimap<K, H, P, A> > impl;
- typedef table<multimap<K, H, P, A> > table;
+ typedef table<multimap<K, H, P, A> > table_base;
     };
 }}}
 

Modified: trunk/boost/unordered/detail/table.hpp
==============================================================================
--- trunk/boost/unordered/detail/table.hpp (original)
+++ trunk/boost/unordered/detail/table.hpp 2011-04-16 20:31:35 EDT (Sat, 16 Apr 2011)
@@ -18,7 +18,7 @@
     // their declaration and implementation.
 
     template <class T>
- class table : public T::buckets, public T::buffered_functions
+ class table : public T::buckets, public T::functions
     {
         table(table const&);
     public:
@@ -27,7 +27,7 @@
         typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
         typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
         typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME T::buffered_functions base;
+ typedef BOOST_DEDUCED_TYPENAME T::functions functions;
         typedef BOOST_DEDUCED_TYPENAME T::buckets buckets;
         typedef BOOST_DEDUCED_TYPENAME T::extractor extractor;
         typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
@@ -182,7 +182,7 @@
                 key_equal const& eq,
                 node_allocator const& a)
           : buckets(a, next_prime(num_buckets)),
- base(hf, eq),
+ functions(hf, eq),
             size_(),
             mlf_(1.0f),
             max_load_(0)
@@ -191,7 +191,7 @@
 
         table(table const& x, node_allocator const& a)
           : buckets(a, x.min_buckets_for_size(x.size_)),
- base(x),
+ functions(x),
             size_(x.size_),
             mlf_(x.mlf_),
             max_load_(0)
@@ -204,7 +204,7 @@
 
         table(table& x, move_tag)
           : buckets(x.node_alloc(), x.bucket_count_),
- base(x),
+ functions(x),
             size_(0),
             mlf_(1.0f),
             max_load_(0)
@@ -214,7 +214,7 @@
 
         table(table& x, node_allocator const& a, move_tag)
           : buckets(a, x.bucket_count_),
- base(x),
+ functions(x),
             size_(0),
             mlf_(x.mlf_),
             max_load_(0)
@@ -579,7 +579,7 @@
         
         typedef ::boost::unordered::detail::node_constructor<value_allocator, Unique> node_constructor;
         typedef ::boost::unordered::detail::buckets<value_allocator, Unique> buckets;
- typedef ::boost::unordered::detail::buffered_functions<hasher, key_equal> buffered_functions;
+ typedef ::boost::unordered::detail::functions<hasher, key_equal> functions;
 
         typedef BOOST_DEDUCED_TYPENAME buckets::node node;
         typedef BOOST_DEDUCED_TYPENAME buckets::bucket bucket;

Modified: trunk/boost/unordered/detail/unique.hpp
==============================================================================
--- trunk/boost/unordered/detail/unique.hpp (original)
+++ trunk/boost/unordered/detail/unique.hpp 2011-04-16 20:31:35 EDT (Sat, 16 Apr 2011)
@@ -12,7 +12,7 @@
 namespace boost { namespace unordered { namespace detail {
 
     template <class T>
- class unique_table : public T::table
+ class unique_table : public T::table_base
     {
     public:
         typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
@@ -20,7 +20,7 @@
         typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
         typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
         typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME T::table table;
+ typedef BOOST_DEDUCED_TYPENAME T::table_base table_base;
         typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
 
         typedef BOOST_DEDUCED_TYPENAME T::node node;
@@ -34,16 +34,16 @@
 
         unique_table(std::size_t n, hasher const& hf, key_equal const& eq,
             value_allocator const& a)
- : table(n, hf, eq, a) {}
+ : table_base(n, hf, eq, a) {}
         unique_table(unique_table const& x)
- : table(x, x.node_alloc()) {}
+ : table_base(x, x.node_alloc()) {}
         unique_table(unique_table const& x, value_allocator const& a)
- : table(x, a) {}
+ : table_base(x, a) {}
         unique_table(unique_table& x, move_tag m)
- : table(x, m) {}
+ : table_base(x, m) {}
         unique_table(unique_table& x, value_allocator const& a,
             move_tag m)
- : table(x, a, m) {}
+ : table_base(x, a, m) {}
         ~unique_table() {}
 
         // equals
@@ -379,7 +379,7 @@
         true>
     {
         typedef ::boost::unordered::detail::unique_table<set<H, P, A> > impl;
- typedef ::boost::unordered::detail::table<set<H, P, A> > table;
+ typedef ::boost::unordered::detail::table<set<H, P, A> > table_base;
     };
 
     template <class K, class H, class P, class A>
@@ -390,7 +390,7 @@
         true>
     {
         typedef ::boost::unordered::detail::unique_table<map<K, H, P, A> > impl;
- typedef ::boost::unordered::detail::table<map<K, H, P, A> > table;
+ typedef ::boost::unordered::detail::table<map<K, H, P, A> > table_base;
     };
 }}}
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk