Boost logo

Boost :

Subject: Re: [boost] [mpl] std::integral_constant support?
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2012-07-17 12:40:42

Le 15/07/2012 19:24, Eric Niebler a écrit :
> The following reasonable-seeming use of mpl::plus doesn't compile:
> #include <utility>
> #include <boost/mpl/plus.hpp>
> typedef std::integral_constant<int, 1> one;
> typedef boost::mpl::plus<one, one>::type two;
> That's because mpl only works with its own integral constant wrappers,
> not the standard one. That seems unfortunate to me. Is there any
> interest in supporting this?
> Here's the error (from clang trunk with glibc++):

This could be done by making all T::tag stuff in mpl us a
tag_of<T>::type appraoch a la Fusion, we can then allow arbitrary types
to model MPL Concepts.

Now, in presence of std::integral_constant maybe mpl shoudl just do

using std::integral_constant;

in addition to the previous fix.

Boost list run by bdawes at, gregod at, cpdaniel at, john at