Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49621 - in sandbox/itl: boost/itl libs/itl/example/boost_party
From: afojgo_at_[hidden]
Date: 2008-11-07 07:01:11


Author: jofaber
Date: 2008-11-07 07:01:11 EST (Fri, 07 Nov 2008)
New Revision: 49621
URL: http://svn.boost.org/trac/boost/changeset/49621

Log:
Refactored Combinator passing. Combinators are now adaptably passed by const reference as function parameters of
add() and subtract(). Stable {msvc-9.0}
Text files modified:
   sandbox/itl/boost/itl/interval_base_map.hpp | 31 +++++++++------
   sandbox/itl/boost/itl/interval_map.hpp | 70 ++++++++++++++++++----------------
   sandbox/itl/boost/itl/split_interval_map.hpp | 78 ++++++++++++++++++++++-----------------
   sandbox/itl/libs/itl/example/boost_party/boost_party.cpp | 14 +++++--
   4 files changed, 109 insertions(+), 84 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-07 07:01:11 EST (Fri, 07 Nov 2008)
@@ -329,9 +329,9 @@
         If Combinator implements max, associated values will contain maximal values and so on.
     */
     template<template<class>class Combinator>
- SubType& add(const base_pair_type& x)
+ SubType& add(const base_pair_type& x, const Combinator<CodomainT>& combine)
     {
- that()->template add_<Combinator>( value_type(interval_type(x.KEY_VALUE), x.CONT_VALUE) );
+ that()->template add_(value_type(interval_type(x.KEY_VALUE), x.CONT_VALUE), combine);
         return *that();
     }
 
@@ -352,8 +352,8 @@
         If Combinator implements max, associated values will contain maximal values and so on.
     */
     template<template<class>class Combinator>
- SubType& add(const value_type& x)
- { that()->template add_<Combinator>(x); return *that(); };
+ SubType& add(const value_type& x, const Combinator<CodomainT>& combine)
+ { that()->add_(x, combine); return *that(); };
 
     /// Addition of a base value pair.
     /** Addition of a base value pair <tt>x := pair(k,y)</tt> where <tt>base_value_type:=pair<DomainT,CodomainT></tt>
@@ -385,7 +385,7 @@
         <tt>m0=m; m.add(x); m.subtract(x);</tt> implies <tt>m==m0 </tt>
     */
     SubType& add(const value_type& x)
- { that()->template add_<inplace_plus>(x); return *that(); }
+ { that()->add_(x, inplace_plus<CodomainT>()); return *that(); }
 //@}
 
 
@@ -405,8 +405,11 @@
         the corresponding add<Combinator>.
     */
     template<template<class>class Combinator>
- void subtract(const base_pair_type& x)
- { that()->template subtract_<Combinator>( value_type(interval_type(x.KEY_VALUE), x.CONT_VALUE) ); }
+ SubType& subtract(const base_pair_type& x, const Combinator<CodomainT>& combine)
+ {
+ that()->subtract_(value_type(interval_type(x.KEY_VALUE), x.CONT_VALUE), combine);
+ return *that();
+ }
 
     /// Subtraction of an interval value pair using a Combinator operation
     /** Subtraction of an interval value pair <tt>x=(I,y)</tt>
@@ -419,7 +422,8 @@
         that is passed a template parameter.
     */
     template<template<class>class Combinator>
- void subtract(const value_type& x){ that()->template subtract_<Combinator>(x); }
+ void subtract(const value_type& x, const Combinator<CodomainT>& combine)
+ { that()->template subtract_(x, combine); }
 
 
     /// Subtraction of a base value pair.
@@ -458,9 +462,9 @@
     SubType& subtract(const value_type& x)
     {
         if(Traits::emits_neutrons)
- that()->template add_<inplace_minus>(x);
+ that()->add_(x, inplace_minus<CodomainT>());
         else
- that()->template subtract_<inplace_minus>(x);
+ that()->subtract_(x, inplace_minus<CodomainT>());
     
         return *that();
     }
@@ -963,10 +967,11 @@
         {
             section.that()->add( value_type(common_interval, (*it).CONT_VALUE) );
             if(is_set<CodomainT>::value)
- section.that()->add<inplace_star>( value_type(common_interval, sectant.CONT_VALUE) );
+ section.that()->add(value_type(common_interval, sectant.CONT_VALUE),
+ inplace_star<CodomainT>());
             else
- section.that()->add<inplace_plus>( value_type(common_interval, sectant.CONT_VALUE) );
- //section.that()->add<inplace_identity>( value_type(common_interval, sectant.CONT_VALUE) );
+ section.that()->add(value_type(common_interval, sectant.CONT_VALUE),
+ inplace_plus<CodomainT>());
         }
     }
 }

Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2008-11-07 07:01:11 EST (Fri, 07 Nov 2008)
@@ -177,20 +177,20 @@
 
 
     template<template<class>class Combinator>
- void add_(const value_type&);
+ void add_(const value_type&, const Combinator<CodomainT>&);
 
     void add_(const value_type& value)
- { add_<inplace_plus>(value); }
+ { add_(value, inplace_plus<CodomainT>()); }
 
     template<template<class>class Combinator>
- void subtract_(const value_type&);
+ void subtract_(const value_type&, const Combinator<CodomainT>&);
 
     void subtract_(const value_type& value)
     {
         if(Traits::emits_neutrons)
- add_<inplace_minus>(value);
+ add_(value, inplace_minus<CodomainT>());
         else
- subtract_<inplace_minus>(value);
+ subtract_(value, inplace_minus<CodomainT>());
     }
 
     void insert_(const value_type& value);
@@ -213,22 +213,26 @@
     iterator joint_insert(iterator& some, const iterator& next);
 
     template<template<class>class Combinator>
- iterator fill_gap_join_left(const value_type&);
+ iterator fill_gap_join_left(const value_type&, const Combinator<CodomainT>&);
 
     template<template<class>class Combinator>
- iterator fill_gap_join_both(const value_type&);
+ iterator fill_gap_join_both(const value_type&, const Combinator<CodomainT>&);
 
     iterator fill_join_left(const value_type&);
     iterator fill_join_both(const value_type&);
 
     template<template<class>class Combinator>
- void add_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
+ void add_rest(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, iterator& end_it, const Combinator<CodomainT>&);
 
     template<template<class>class Combinator>
- void add_rear(const interval_type& x_itv, const CodomainT& x_val, iterator& it);
+ void add_rear(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, const Combinator<CodomainT>&);
 
     template<template<class>class Combinator>
- void subtract_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
+ void subtract_rest(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, iterator& end_it,
+ const Combinator<CodomainT>&);
 
     void insert_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
     void insert_rear(const interval_type& x_itv, const CodomainT& x_val, iterator& it);
@@ -407,9 +411,9 @@
     template<template<class>class Combinator>
 typename interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>::iterator
 interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::fill_gap_join_left(const value_type& value)
+ ::fill_gap_join_left(const value_type& value, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     //collision free insert is asserted
     if(value.KEY_VALUE.empty())
         return this->_map.end();
@@ -436,9 +440,9 @@
     template<template<class>class Combinator>
 typename interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>::iterator
 interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::fill_gap_join_both(const value_type& value)
+ ::fill_gap_join_both(const value_type& value, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     //collision free insert is asserted
     if(value.KEY_VALUE.empty())
         return this->_map.end();
@@ -467,9 +471,9 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::add_(const value_type& x)
+ ::add_(const value_type& x, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
 
     const interval_type& x_itv = x.KEY_VALUE;
     if(x_itv.empty())
@@ -541,9 +545,9 @@
                 fill_join_left(value_type(interSec, cmb_val));
 
             if(!leadGap.empty())
- fill_gap_join_both<Combinator>(value_type(leadGap, x_val));
+ fill_gap_join_both(value_type(leadGap, x_val), combine);
             if(!endGap.empty())
- fill_gap_join_both<Combinator>(value_type(endGap, x_val));
+ fill_gap_join_both(value_type(endGap, x_val), combine);
             else
                 fill_join_left(value_type(rightResid, cur_val));
         }
@@ -554,13 +558,13 @@
             fill_join_left(value_type(interSec, cmb_val));
 
             if(!leadGap.empty())
- fill_gap_join_both<Combinator>(value_type(leadGap, x_val));
+ fill_gap_join_both(value_type(leadGap, x_val), combine);
 
             // shrink interval
             interval_type x_rest(x_itv);
             x_rest.left_subtract(fst_itv);
 
- add_rest<Combinator>(x_rest, x_val, snd_it, end_it);
+ add_rest(x_rest, x_val, snd_it, end_it, combine);
         }
     }
 }
@@ -568,9 +572,9 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::add_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it)
+ ::add_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
 
     iterator nxt_it = it; nxt_it++;
     interval_type x_rest = x_itv, left_gap, common, cur_itv;
@@ -581,7 +585,7 @@
         x_rest.left_surplus(left_gap, cur_itv);
 
         combine(it->CONT_VALUE, x_val);
- fill_gap_join_left<Combinator>(value_type(left_gap, x_val)); //A posteriori
+ fill_gap_join_left(value_type(left_gap, x_val), combine); //A posteriori
 
         if(Traits::absorbs_neutrons && it->CONT_VALUE == CodomainT())
             this->_map.erase(it++);
@@ -597,15 +601,15 @@
         nxt_it++;
     }
 
- add_rear<Combinator>(x_rest, x_val, it);
+ add_rear(x_rest, x_val, it, combine);
 }
 
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it)
+ ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
 
     interval_type cur_itv = (*it).KEY_VALUE ;
     CodomainT cur_val = (*it).CONT_VALUE ;
@@ -633,9 +637,9 @@
         fill_join_left(value_type(common, cmb_val));
 
     if(!lead_gap.empty())
- fill_gap_join_both<Combinator>(value_type(lead_gap, x_val));
+ fill_gap_join_both(value_type(lead_gap, x_val), combine);
     if(!end_gap.empty())
- fill_gap_join_both<Combinator>(value_type(end_gap, x_val));
+ fill_gap_join_both(value_type(end_gap, x_val), combine);
     else
         fill_join_left(value_type(right_resid, cur_val));
 }
@@ -647,9 +651,9 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::subtract_(const value_type& x)
+ ::subtract_(const value_type& x, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     const interval_type& x_itv = x.KEY_VALUE;
 
     if(x_itv.empty())
@@ -708,7 +712,7 @@
         interval_type x_rest(x_itv);
         x_rest.left_subtract(fst_itv);
 
- subtract_rest<Combinator>(x_rest, x_val, snd_it, end_it);
+ subtract_rest(x_rest, x_val, snd_it, end_it, combine);
     }
 }
 
@@ -717,9 +721,9 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::subtract_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it)
+ ::subtract_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     iterator nxt_it=it; nxt_it++;
 
     while(nxt_it!=end_it)

Modified: sandbox/itl/boost/itl/split_interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_map.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_map.hpp 2008-11-07 07:01:11 EST (Fri, 07 Nov 2008)
@@ -192,20 +192,20 @@
 
 
         template<template<class>class Combinator>
- void add_(const value_type&);
+ void add_(const value_type&, const Combinator<CodomainT>&);
 
         void add_(const value_type& value)
- { add_<inplace_plus>(value); }
+ { add_(value, inplace_plus<CodomainT>()); }
 
         template<template<class>class Combinator>
- void subtract_(const value_type&);
+ void subtract_(const value_type&, const Combinator<CodomainT>&);
 
         void subtract_(const value_type& value)
         {
             if(Traits::emits_neutrons)
- add_<inplace_minus>(value);
+ add_(value, inplace_minus<CodomainT>());
             else
- subtract_<inplace_minus>(value);
+ subtract_(value, inplace_minus<CodomainT>());
         }
 
         void insert_(const value_type& value);
@@ -221,16 +221,21 @@
         void fill(const value_type&);
 
         template<template<class>class Combinator>
- void fill_gap(const value_type&);
+ void fill_gap(const value_type&, const Combinator<CodomainT>& combine);
 
         template<template<class>class Combinator>
- void add_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
+ void add_rest(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, iterator& end_it,
+ const Combinator<CodomainT>& combine);
 
         template<template<class>class Combinator>
- void add_rear(const interval_type& x_itv, const CodomainT& x_val, iterator& it);
+ void add_rear(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, const Combinator<CodomainT>& combine);
 
         template<template<class>class Combinator>
- void subtract_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
+ void subtract_rest(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, iterator& end_it,
+ const Combinator<CodomainT>& combine);
 
         void insert_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it);
         void insert_rear(const interval_type& x_itv, const CodomainT& x_val, iterator& it);
@@ -300,9 +305,9 @@
           template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::fill_gap(const value_type& value)
+ ::fill_gap(const value_type& value, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     //collision free insert is asserted
     if(value.KEY_VALUE.empty())
         return;
@@ -325,9 +330,9 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::add_(const value_type& x)
+ ::add_(const value_type& x, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     const interval_type& x_itv = x.KEY_VALUE;
 
     if(x_itv.empty())
@@ -362,7 +367,7 @@
 
         interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
         // this is a new Interval that is a gap in the current map
- fill_gap<Combinator>(value_type(leadGap, x_val));
+ fill_gap(value_type(leadGap, x_val), combine);
 
         // only for the first there can be a leftResid: a part of *it left of x
         interval_type leftResid; fst_itv.left_surplus(leftResid, x_itv);
@@ -382,7 +387,7 @@
 
             interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
             // this is a new Interval that is a gap in the current map
- fill_gap<Combinator>(value_type(endGap, x_val));
+ fill_gap(value_type(endGap, x_val), combine);
 
             // only for the last there can be a rightResid: a part of *it right of x
             interval_type rightResid; (*fst_it).KEY_VALUE.right_surplus(rightResid, x_itv);
@@ -402,7 +407,7 @@
             interval_type x_rest(x_itv);
             x_rest.left_subtract(fst_itv);
 
- add_rest<Combinator>(x_rest, x_val, snd_it, end_it);
+ add_rest(x_rest, x_val, snd_it, end_it, combine);
         }
     }
 }
@@ -410,9 +415,11 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::add_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it)
+ ::add_rest(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, iterator& end_it,
+ const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     iterator nxt_it = it; nxt_it++;
     interval_type x_rest = x_itv, gap, common, cur_itv;
 
@@ -422,7 +429,7 @@
         x_rest.left_surplus(gap, cur_itv);
 
         combine(it->CONT_VALUE, x_val);
- fill_gap<Combinator>(value_type(gap, x_val));
+ fill_gap(value_type(gap, x_val), combine);
 
         if(Traits::absorbs_neutrons && it->CONT_VALUE == CodomainT())
             this->_map.erase(it++);
@@ -433,21 +440,22 @@
         nxt_it++;
     }
 
- add_rear<Combinator>(x_rest, x_val, it);
+ add_rear(x_rest, x_val, it, combine);
 }
 
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it)
+ ::add_rear(const interval_type& x_rest, const CodomainT& x_val, iterator& it,
+ const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     interval_type cur_itv = (*it).KEY_VALUE ;
     CodomainT cur_val = (*it).CONT_VALUE ;
 
     interval_type left_gap;
     x_rest.left_surplus(left_gap, cur_itv);
- fill_gap<Combinator>(value_type(left_gap, x_val));
+ fill_gap(value_type(left_gap, x_val), combine);
 
     interval_type common;
     cur_itv.intersect(common, x_rest);
@@ -457,7 +465,7 @@
 
     interval_type end_gap;
     x_rest.right_surplus(end_gap, cur_itv);
- fill_gap<Combinator>(value_type(end_gap, x_val));
+ fill_gap(value_type(end_gap, x_val), combine);
 
     // only for the last there can be a rightResid: a part of *it right of x
     interval_type right_resid;
@@ -475,9 +483,9 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::subtract_(const value_type& x)
+ ::subtract_(const value_type& x, const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     const interval_type& x_itv = x.KEY_VALUE;
 
     if(x_itv.empty())
@@ -526,7 +534,7 @@
         fill(value_type(leftResid, fst_val));
         fill(value_type(interSec, cmb_val));
 
- subtract_rest<Combinator>(x_itv, x_val, snd_it, end_it);
+ subtract_rest(x_itv, x_val, snd_it, end_it, combine);
     }
 }
 
@@ -535,9 +543,11 @@
 template <typename DomainT, typename CodomainT, class Traits, template<class>class Interval, template<class>class Compare, template<class>class Alloc>
     template<template<class>class Combinator>
 void split_interval_map<DomainT,CodomainT,Traits,Interval,Compare,Alloc>
- ::subtract_rest(const interval_type& x_itv, const CodomainT& x_val, iterator& it, iterator& end_it)
+ ::subtract_rest(const interval_type& x_itv, const CodomainT& x_val,
+ iterator& it, iterator& end_it,
+ const Combinator<CodomainT>& combine)
 {
- static Combinator<CodomainT> combine;
+ //CL static Combinator<CodomainT> combine;
     iterator nxt_it=it; nxt_it++;
 
     while(nxt_it!=end_it)
@@ -612,7 +622,7 @@
 
         interval_type leadGap; x_itv.left_surplus(leadGap, fst_itv);
         // this is a new Interval that is a gap in the current map
- fill_gap<inplace_plus>(value_type(leadGap, x_val));
+ fill_gap(value_type(leadGap, x_val), inplace_plus<CodomainT>());
 
         // only for the first there can be a leftResid: a part of *it left of x
         interval_type leftResid; fst_itv.left_surplus(leftResid, x_itv);
@@ -627,7 +637,7 @@
         {
             interval_type endGap; x_itv.right_surplus(endGap, fst_itv);
             // this is a new Interval that is a gap in the current map
- fill_gap<inplace_plus>(value_type(endGap, x_val));
+ fill_gap(value_type(endGap, x_val), inplace_plus<CodomainT>());
         }
         else
         {
@@ -654,7 +664,7 @@
     {
         cur_itv = (*it).KEY_VALUE ;
         x_rest.left_surplus(gap, cur_itv);
- fill_gap<inplace_plus>(value_type(gap, x_val));
+ fill_gap(value_type(gap, x_val), inplace_plus<CodomainT>());
         // shrink interval
         x_rest.left_subtract(cur_itv);
     }
@@ -672,14 +682,14 @@
 
     interval_type left_gap;
     x_rest.left_surplus(left_gap, cur_itv);
- fill_gap<inplace_plus>(value_type(left_gap, x_val));
+ fill_gap(value_type(left_gap, x_val), inplace_plus<CodomainT>());
 
     interval_type common;
     cur_itv.intersect(common, x_rest);
 
     interval_type end_gap;
     x_rest.right_surplus(end_gap, cur_itv);
- fill_gap<inplace_plus>(value_type(end_gap, x_val));
+ fill_gap(value_type(end_gap, x_val), inplace_plus<CodomainT>());
 }
 
 

Modified: sandbox/itl/libs/itl/example/boost_party/boost_party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/boost_party/boost_party.cpp (original)
+++ sandbox/itl/libs/itl/example/boost_party/boost_party.cpp 2008-11-07 07:01:11 EST (Fri, 07 Nov 2008)
@@ -111,26 +111,32 @@
 
     // adding an element can be done wrt. simple aggregate functions
     // like e.g. min, max etc. in their 'inplace' or op= incarnation
- tallest_guest.add<inplace_max>(
+ tallest_guest.add(
       make_pair(
         rightopen_interval<ptime>(
           time_from_string("2008-05-20 19:30"),
           time_from_string("2008-05-20 23:00")),
- 180));
+ 180),
+ inplace_max<int>()
+ );
 
     tallest_guest.add<inplace_max>(
       make_pair(
         rightopen_interval<ptime>(
           time_from_string("2008-05-20 20:10"),
           time_from_string("2008-05-21 00:00")),
- 170));
+ 170),
+ inplace_max<int>()
+ );
 
     tallest_guest.add<inplace_max>(
       make_pair(
         rightopen_interval<ptime>(
           time_from_string("2008-05-20 22:15"),
           time_from_string("2008-05-21 00:30")),
- 200));
+ 200),
+ inplace_max<int>()
+ );
 
 
     BoostPartyAttendenceHistoryT::iterator it = party.begin();


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