Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-07-29 20:32:23


"David Abrahams" <dave_at_[hidden]> wrote in message
news:ulkqccd9c.fsf_at_boost-consulting.com...

> 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'.

The larger problem (potentially) is that boost::integral_constant which is used
by a lot of type_traits metafunctions does have the tag memeber(because its
derived
from mpl::integral_c), but it doesnt advertise it in its documentation. It would
be interesting to try a version of boost::integral_constant which matches the
std::integral_constant requirements and no more and see what if any problems it
causes, particularly for code that uses mpl, to see what problems might be
caused by replacing boost::integral_constant with std::integral_constant.

Of course I may be making a fuss out of nothing, but to me it looks like this
issue could cause a lot of problems.

Also perhaps boost::integral-constant (the type_traits version) should then be
changed to implement only the requirements of the std::integral_constant... IOW
not derive from mpl::integral_c ?

regards
Andy Little


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