Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49681 - in sandbox/itl/boost: itl itl_xt
From: afojgo_at_[hidden]
Date: 2008-11-11 00:44:35


Author: jofaber
Date: 2008-11-11 00:44:33 EST (Tue, 11 Nov 2008)
New Revision: 49681
URL: http://svn.boost.org/trac/boost/changeset/49681

Log:
Refactored itl::map template template parameter Compare to template class parameter. Stable {msvc-9.0}
Text files modified:
   sandbox/itl/boost/itl/interval_base_map.hpp | 4 +-
   sandbox/itl/boost/itl/map.hpp | 46 ++++++++++++++++++++--------------------
   sandbox/itl/boost/itl_xt/tuple_computer.hpp | 2
   3 files changed, 26 insertions(+), 26 deletions(-)

Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2008-11-11 00:44:33 EST (Tue, 11 Nov 2008)
@@ -196,7 +196,7 @@
 
     /// Container type for the implementation
     typedef itl::map<interval_type,codomain_type,Traits,
- exclusive_less,Alloc> ImplMapT;
+ exclusive_less<interval_type>,Alloc> ImplMapT;
 
     /// key type of the implementing container
     typedef typename ImplMapT::key_type key_type;
@@ -220,7 +220,7 @@
 
     /// The atomized type is elementbased map that is equivalent to the interval map
     typedef typename itl::map<DomainT,CodomainT,
- Traits,Compare,Alloc> atomized_type;
+ Traits,Compare<DomainT>,Alloc> atomized_type;
 //@}
 
 public:

Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2008-11-11 00:44:33 EST (Tue, 11 Nov 2008)
@@ -103,19 +103,19 @@
         typename KeyT,
         typename DataT,
         class Traits = itl::neutron_absorber,
- template<class>class Compare = std::less,
+ class Compare = std::less<KeyT>,
         template<class>class Alloc = std::allocator
>
- class map: private std::map<KeyT, DataT, Compare<KeyT>,
+ class map: private std::map<KeyT, DataT, Compare,
                                 Alloc<std::pair<const KeyT, DataT> > >
     {
     public:
         typedef Alloc<typename std::pair<const KeyT, DataT> > allocator_type;
 
         typedef typename itl::map<KeyT, DataT, Traits, Compare, Alloc> type;
- typedef typename std::map<KeyT, DataT, Compare<KeyT>,
+ typedef typename std::map<KeyT, DataT, Compare,
                                   allocator_type> base_type;
- typedef typename itl::set<KeyT,Compare<KeyT>,Alloc> set_type;
+ typedef typename itl::set<KeyT,Compare,Alloc> set_type;
 
         typedef itl::map<KeyT, DataT, itl::neutron_absorber, Compare, Alloc>
                                                                neutron_absorber_type;
@@ -129,7 +129,7 @@
         typedef DataT data_type;
         typedef DataT codomain_type;
         typedef std::pair<const KeyT, DataT> value_type;
- typedef Compare<KeyT> key_compare;
+ typedef Compare key_compare;
         typedef typename base_type::value_compare value_compare;
 
     public:
@@ -313,30 +313,30 @@
 
     /** Standard equality, which is lexicographical equality of the sets
         as sequences, that are given by their Compare order. */
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     inline bool operator == (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
                              const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
         return operator==((const base_type&)lhs, (const base_type&)rhs);
     }
 
     //JODO comment...
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     inline bool is_element_equal(const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
                                  const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
         return operator==((const base_type&)lhs, (const base_type&)rhs);
     }
 
     /** Protonic equality is equality on all elements that do not carry a neutron as content. */
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     inline bool is_protonic_equal (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
                                    const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
         //JODO: Efficient implementation.
- typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
 
         itl::map<KeyT,DataT,Traits,Compare,Alloc> lhs0 = lhs;
         itl::map<KeyT,DataT,Traits,Compare,Alloc> rhs0 = rhs;
@@ -346,24 +346,24 @@
     }
 
     /** Strict weak less ordering which is given by the Compare order */
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     inline bool operator < (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
         const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
         return operator<((const base_type&)lhs, (const base_type&)rhs);
     }
 
     /** Partial ordering which is induced by Compare */
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     inline bool operator <= (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
         const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
         return operator<=((const base_type&)lhs, (const base_type&)rhs);
     }
 
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
         template <template<class>class Combinator>
     typename map<KeyT,DataT,Traits,Compare,Alloc>::iterator
         map<KeyT,DataT,Traits,Compare,Alloc>::add(const value_type& val)
@@ -398,7 +398,7 @@
         }
     }
 
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     typename map<KeyT,DataT,Traits,Compare,Alloc>::size_type
         map<KeyT,DataT,Traits,Compare,Alloc>
         ::erase(const value_type& value_pair)
@@ -418,7 +418,7 @@
     }
 
 
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     typename map<KeyT,DataT,Traits,Compare,Alloc>::iterator
         map<KeyT,DataT,Traits,Compare,Alloc>::subtract(const value_type& val)
     {
@@ -444,7 +444,7 @@
     }
 
 
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
     std::string map<KeyT,DataT,Traits,Compare,Alloc>::as_string()const
     {
         std::string repr;
@@ -460,7 +460,7 @@
         return repr;
     }
 
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
         template<class Predicate>
     map<KeyT,DataT,Traits,Compare,Alloc>& map<KeyT,DataT,Traits,Compare,Alloc>
         ::erase_if(const Predicate& pred)
@@ -474,7 +474,7 @@
     }
 
 
- template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
         template<class Predicate>
     map<KeyT,DataT,Traits,Compare,Alloc>& map<KeyT,DataT,Traits,Compare,Alloc>
         ::assign_if(const map<KeyT,DataT,Traits,Compare,Alloc>& src, const Predicate& pred)
@@ -489,7 +489,7 @@
     }
     //-------------------------------------------------------------------------
     template <typename KeyT, typename DataT, class Traits,
- template<class>class Compare, template<class>class Alloc>
+ class Compare, template<class>class Alloc>
     map<KeyT,DataT,Traits,Compare,Alloc>&
         insert(map<KeyT,DataT,Traits,Compare,Alloc>& object,
                const map<KeyT,DataT,Traits,Compare,Alloc>& insertee)
@@ -503,7 +503,7 @@
     }
 
     template <typename KeyT, typename DataT, class Traits,
- template<class>class Compare, template<class>class Alloc>
+ class Compare, template<class>class Alloc>
     map<KeyT,DataT,Traits,Compare,Alloc>&
         erase(map<KeyT,DataT,Traits,Compare,Alloc>& object,
               const map<KeyT,DataT,Traits,Compare,Alloc>& erasee)

Modified: sandbox/itl/boost/itl_xt/tuple_computer.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/tuple_computer.hpp (original)
+++ sandbox/itl/boost/itl_xt/tuple_computer.hpp 2008-11-11 00:44:33 EST (Tue, 11 Nov 2008)
@@ -102,7 +102,7 @@
         typedef var_tuple<VarCount> var_tuple_type;
         typedef var_tuple_order<var_tuple_type> tuple_order_type;
         /// Container type for the implementation
- typedef itl::map<var_tuple_type, CounterT, neutron_absorber, var_tuple_order> ImplMapTD;
+ typedef itl::map<var_tuple_type, CounterT, neutron_absorber, var_tuple_order<var_tuple_type> > ImplMapTD;
         /// iterator
         typedef typename ImplMapTD::iterator iterator;
         /// const_iterator


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