I'm having problems compiling non-explicitly-declared mpl::set types.
Here's an example:
<block1>
typedef set<char> set1_t;
BOOST_MPL_ASSERT_RELATION(size::value, ==, 1);
//test iterating through the mpl.set:
typedef begin::type set1_itr0_t;
BOOST_MPL_ASSERT((is_same::type, char>::type));
typedef next::type set1_itr1_t;
BOOST_MPL_ASSERT((is_same::type>::type));
</block1>
In block1, I declare a set with one type, char, and then iterate over it.
This code compiles, as expected.
<block2>
typedef set<> empty_set;
BOOST_MPL_ASSERT_RELATION(size::value, ==, 0);
typedef insert::type set2_t;
BOOST_MPL_ASSERT_RELATION(size::value, ==, 1);
//test iterating through the mpl.set:
typedef begin::type set2_itr0_t;
BOOST_MPL_ASSERT((is_same::type, char>::type));
typedef next::type set2_itr1_t;//compile error at this line
BOOST_MPL_ASSERT((is_same::type>::type));
</block2>
In block2, I declare a set with no types, then insert a char type, then
iterate over the resulting sequence. At the line where I get the second
iterator, I get a compile error:
boost\mpl\set\aux_\iterator.hpp(52) : error C3083: 'next_': the symbol to
the left of a '::' must be a type
boost\mpl\eval_if.hpp(41) : see reference to class template
instantiation 'boost::mpl::next<T>' being compiled
with
[
T=boost::mpl::s_iterboost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,b...>
]
boost\mpl\set\aux_\iterator.hpp(56) : see reference to class
template instantiation 'boost::mpl::eval_if' being compiled
with
[
C=boost::mpl::has_keyboost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,b...::type>,
F1=boost::mpl::identityboost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,b...>>,
F2=boost::mpl::nextboost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,b...>>
]
source.cpp(120) : see reference to class template instantiation
'boost::mpl::next<T>' being compiled
with
[
T=set2_itr0_t
]
MSVS 8.0 is the compiler(_MSC_VER == 1400).
Am I missing an obvious error in my code?
Thanks!
_________________________________________________________________
Need a break? Find your escape route with Live Search Maps.
http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01