Boost logo

Boost Users :

From: Martin Apel (martin.apel_at_[hidden])
Date: 2007-08-07 04:09:03


Hi *,

I have two mpl maps like this:

typedef
map<pair<int_<1>, int_<42> >,
    pair<int_<2>, int_<43> >,
    pair<int_<3>, int_<44> >
> Map1;

typedef
map<pair<int_<4>, int_<44> >,
    pair<int_<5>, int_<45> >,
    pair<int_<6>, int_<46> >
> Map2;

I try to join them using "joint_view" as follows:

typedef joint_view<Map1, Map2>::type JointMap;

which works fine. Then I do

std::cout << at<JointMap, int_<2> >::type::value << "\n";

which gives the following compiler error:

error: 'value' is not a member of 'boost::mpl::pair<mpl_::int_<3>,
mpl_::int_<44> >'

I tried this with gcc 3.4.6 and 4.2 under Linux, Boost version is 1.34.0.
It seems "at" returns the entry after the searched entry, and not only
the right half, but the complete pair.

Has anybody got any hints on this? To me it looks like a bug in MPL, but
I might be wrong.

Best Regards,

Martin

____________
Virus checked: AVKB 17.327 from 06.08.2007


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