Boost logo

Boost :

Subject: Re: [boost] New dependency report
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-06-06 14:40:04


On Friday 06 June 2014 16:39:13 John Maddock wrote:
> >
> > MPL decomposition is also pending, but it's probably better to split it
> > into two modules MPL and MPL.Core, similar to TypeTraits. For many cases
> > dependency on MPL.Core would be enough.
>
> I'm tied of saying this.... but if mpl::bool_ and int_ were moved out of
> MPL full, either to core, or to some mpl_core, then there's no need to
> split type_traits anymore.

Yes, that's one way to do it. However, TypeTraits.Core could have no
dependency on MPL at all an be sufficient for things like value_init.hpp and
blank.hpp. Arguably this way has more potential.

> Indeed I suspect there's a huge amount of obfuscated code inherited from
> mpl's broken-compiler-workarounds that can now be removed: not only do
> we not support those compilers any more, but given that they haven't
> been tested in heaven knows how long they're unlikely to compile *any*
> of modern Boost anyway.
>
> In fact in C++11 it makes sense to me have:
>
> namespace boost{ namespace mpl{
>
> template <bool b>
> using bool_ = std::integral_constant<bool, b>;
> template <int i>
> using int_ = std::integral_constant<int, i>;
>
> }
>
> // replaces boost::integral_constant:
> using std::integral_constant;
>
> }
>
> Now any function or template that's overloaded/specialized on mpl::bool_
> or int_ will also "just work" with std:: type_traits as well as boost ones.

Yes, that's something to consider when working on MPL.Core.


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