|
Boost : |
Subject: Re: [boost] Range_Ex and Multi-Index: conflicting mpl::begin andboost::begin
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-03-18 14:02:07
Hi Sandeep,
I think your problem comes from the fact that you should have some using namespace declarations.
using namespace boost;
using namespace boost::mpl;
If this is the case, try removing them and been explicit about which begin do you want; i.e. moost::begin or boost::mpl::begin.
If this is not the case, I have no idead without a complete example and the result of the compilation.
Best,
Vicente
----- Original Message -----
From: "Sandeep Gupta" <gupta.sandeep_at_[hidden]>
To: <boost-users_at_[hidden]>; <boost_at_[hidden]>
Sent: Wednesday, March 18, 2009 6:38 PM
Subject: [boost] Range_Ex and Multi-Index: conflicting mpl::begin andboost::begin
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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk