[mpl] Possible documentation bug

The MPL Reference Manual page for at_c: http://www.boost.org/libs/mpl/doc/refmanual/at-c.html Contains the following sample code: typedef range_c<long,10,50> range; BOOST_MPL_ASSERT_RELATION( (at_c< range,0 >::value), ==, 10 ); BOOST_MPL_ASSERT_RELATION( (at_c< range,10 >::value), ==, 20 ); BOOST_MPL_ASSERT_RELATION( (at_c< range,40 >::value), ==, 50 ); Does at_c<unspecified>::value exist? I get a compilation error: error: `value' is not a member of type `boost::mpl::at_c<range, 0> '

Brad Austin writes:
The MPL Reference Manual page for at_c:
http://www.boost.org/libs/mpl/doc/refmanual/at-c.html
Contains the following sample code:
typedef range_c<long,10,50> range; BOOST_MPL_ASSERT_RELATION( (at_c< range,0 >::value), ==, 10 ); BOOST_MPL_ASSERT_RELATION( (at_c< range,10 >::value), ==, 20 ); BOOST_MPL_ASSERT_RELATION( (at_c< range,40 >::value), ==, 50 );
Does at_c<unspecified>::value exist?
Nope, the above should be BOOST_MPL_ASSERT_RELATION( (at_c< range,0 >::type::value), ==, 10 ); BOOST_MPL_ASSERT_RELATION( (at_c< range,10 >::type::value), ==, 20 ); BOOST_MPL_ASSERT_RELATION( (at_c< range,40 >::type::value), ==, 50 ); ^^^^^^ Fixed in the CVS, thanks for the report! -- Aleksey Gurtovoy MetaCommunications Engineering
participants (2)
-
Aleksey Gurtovoy
-
Brad Austin