[Boost-bugs] [Boost C++ Libraries] #1099: unable to iterate through a "non-explicitly-declared" mpl::set

Subject: [Boost-bugs] [Boost C++ Libraries] #1099: unable to iterate through a "non-explicitly-declared" mpl::set
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-07-19 21:59:34


#1099: unable to iterate through a "non-explicitly-declared" mpl::set
--------------------------------+-------------------------------------------
 Reporter: wheber_at_[hidden] | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: mpl | Version: release 1.34.0
 Severity: Problem | Keywords:
--------------------------------+-------------------------------------------
 Iteration through the elements of an explicitly declared mpl::set works as
 advertised. However, if the set is not explicitly declared, iteration
 does not compile.

 Here is a simple case:

 {{{
 typedef set<> empty_set;
 BOOST_MPL_ASSERT_RELATION(size<empty_set>::value, ==, 0);

 typedef insert<empty_set, char>::type set2_t;
 BOOST_MPL_ASSERT_RELATION(size<set2_t>::value, ==, 1);
 //test iterating through the mpl.set:
 typedef begin<set2_t>::type set2_itr0_t;
 BOOST_MPL_ASSERT((is_same<deref<set2_itr0_t>::type, char>::type));
 typedef next<set2_itr0_t>::type set2_itr1_t;//compile error at this line
 BOOST_MPL_ASSERT((is_same<set2_itr1_t, end<set2_t>::type>::type));
 }}}

 Both compilers I've been able to try report the error (msvc 8.0 and gcc
 3.4.4).

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1099>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC