Boost logo

Boost Users :

Subject: [Boost-users] Range_Ex and Multi-Index: conflicting mpl::begin and boost::begin
From: Sandeep Gupta (gupta.sandeep_at_[hidden])
Date: 2009-03-18 13:38:01


Hi,
 I am under-impression that for_each construct of range_ex for all
container concepts. However when I tried with multi-index it gave
conflicting errors. Attached below is the code and corresponding
errors.

code:

typedef multi_index_container<
     std::pair<value_type,int>,
     indexed_by<
     ordered_unique<member<pair<value_type,int>, value_type,
&pair<value_type, int>::first> >,
     ordered_unique<member<pair<value_type,int>, int,
&pair<value_type, int>::second> >
>
> mic;

mic serialStore;
 for_each(serialStore, std::cout<<boost::lambda::_1<<' ');

error:
/home/sandeep/Computing/boost_1_38_0/boost/mpl/begin_end_fwd.hpp:22:
error: ‘template<class Sequence> struct boost::mpl::begin’ is not a
function,
/home/sandeep/Computing/boost_1_38_0/boost/range/begin.hpp:96: error:
 conflict with ‘template<class T> typename boost::range_iterator::type
boost::begin(T&)’
/home/sandeep/Computing/boost_1_38_0/boost/range_ex/./detail/adl_begin_end.hpp:27:
error: in call to ‘begin’

/home/sandeep/Computing/boost_1_38_0/boost/mpl/begin_end_fwd.hpp:23:
error: ‘template<class Sequence> struct boost::mpl::end’ is not a
function,
/home/sandeep/Computing/boost_1_38_0/boost/range/end.hpp:92: error:
conflict with ‘template<class T> typename boost::range_iterator::type
boost::end(T&)’
/home/sandeep/Computing/boost_1_38_0/boost/range_ex/./detail/adl_begin_end.hpp:35:
error: in call to ‘end’

I apologies in advance if this is due to trivial omission.

Thanks
-sandeep


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net