|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-12-14 17:15:29
"Ovanes Markarian" <om_boost_at_[hidden]> writes:
> Now I have a question regarding iteration through the map. Would you
> expect this sample to work:
>
>
> typedef mpl::map
> <
> mpl::pair<int, int>
> , mpl::pair<int, double>
> , mpl::pair<int, char[20]>
> , mpl::pair<int, char>
> > seq_t;
>
> typedef mpl::begin<seq_t>::type begin_map;
> typedef mpl::apply
> <
> mpl::insert<mpl::_1, mpl::_2>
> , mpl::vector<>
> , begin_map
> >::type vector_with_one_elem;
No.
I'm not sure what you're trying to do here, but it fails for the same
reason that this fails:
mpl::insert<mpl::vector<>, begin_map>::type
The two-argument form of mpl::insert only works for inserting into
associative sequences. vector is not an associative sequence.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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