Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-01-28 01:54:36


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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk