Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-07-29 17:27:59


"Andy Little" <andy_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote
>> "Andy Little" <andy_at_[hidden]> writes:
>>> Also I suspect that the change from boost::is_same to std::is_same is going
>>> to
>>> break a lot of code, unless the mpl tag requiremnet is lifted ;-)
>
>> Ditto.
>
> The boost type_traits integral constant is derived from mpl::integral_c which
> has a tag type member, without which boost:::integral_constant wouldnt work with
> mpl types such as equal_to.

?? equal_to isn't a type.

> The std version doesnt specify the tag, nor does the
> boost type_traits version in its documentation. Without the tag,
> boost::integral_constant would not work with mpl types such as equal_to as
> demonstrated in another mail in this thread. Therefore changing from
> boost::integral_constant to std::integral_constant will break code that uses
> mpl. Maybe its not important, but the innocent std:: integral_constant will
> appear to be bug ridden.

I see no requirement that a `tag' type member be included in
http://boost.org/libs/mpl/doc/refmanual/integral-constant.html.
However, it does look like the current implementation of equal_to
depends on the presence of `tag'. I'm not sure what the plan was
here; Aleksey?

It would be easy enough to make most of the MPL numeric metafunctions
work on types that don't supply `tag'.
 

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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