Boost logo

Boost :

Subject: Re: [boost] [mpl] Modularization pull request
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2014-09-17 13:45:27


Le 17/09/14 19:29, Peter Dimov a écrit :
> Vicente J. Botet Escriba wrote:
>
>> Ok, I have not missed nothing. The split could help to break cycles,
>> but it doesn't yet.
>
> Type Traits depends on MPL now only via Typeof

This is wrong

    /mpl/ <http://www.pdimov.com/tmp/report-d53f656/mpl.html>

      |<boost/mpl/and.hpp>|

  * from |<boost/type_traits/is_virtual_base_of.hpp>|

      |<boost/mpl/assert.hpp>|

  * from |<boost/type_traits/common_type.hpp>|
  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/at.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|
  * from |<boost/type_traits/floating_point_promotion.hpp>|

      |<boost/mpl/aux_/config/lambda.hpp>|

  * from |<boost/type_traits/detail/template_arity_spec.hpp>|

      |<boost/mpl/aux_/config/overload_resolution.hpp>|

  * from |<boost/type_traits/detail/template_arity_spec.hpp>|

      |<boost/mpl/aux_/lambda_support.hpp>|

  * from |<boost/type_traits/detail/bool_trait_def.hpp>|
  * from |<boost/type_traits/detail/size_t_trait_def.hpp>|
  * from |<boost/type_traits/detail/type_trait_def.hpp>|

      |<boost/mpl/aux_/preprocessor/params.hpp>|

  * from |<boost/type_traits/detail/template_arity_spec.hpp>|

      |<boost/mpl/aux_/template_arity_fwd.hpp>|

  * from |<boost/type_traits/detail/template_arity_spec.hpp>|

      |<boost/mpl/begin_end.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/bool.hpp>|

  * from |<boost/type_traits/common_type.hpp>|
  * from |<boost/type_traits/detail/bool_trait_def.hpp>|
  * from |<boost/type_traits/integral_constant.hpp>|

      |<boost/mpl/contains.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/copy.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/deref.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/eval_if.hpp>|

  * from |<boost/aligned_storage.hpp>|
  * from |<boost/type_traits/decay.hpp>|
  * from |<boost/type_traits/detail/common_type_imp.hpp>|
  * from |<boost/type_traits/integral_promotion.hpp>|

      |<boost/mpl/identity.hpp>|

  * from |<boost/aligned_storage.hpp>|
  * from |<boost/type_traits/decay.hpp>|
  * from |<boost/type_traits/integral_promotion.hpp>|

      |<boost/mpl/if.hpp>|

  * from |<boost/type_traits/common_type.hpp>|
  * from |<boost/type_traits/conditional.hpp>|
  * from |<boost/type_traits/detail/common_type_imp.hpp>|
  * from |<boost/type_traits/make_signed.hpp>|
  * from |<boost/type_traits/make_unsigned.hpp>|
  * from |<boost/type_traits/type_with_alignment.hpp>|

      |<boost/mpl/inserter.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/int.hpp>|

  * from |<boost/type_traits/detail/template_arity_spec.hpp>|
  * from |<boost/type_traits/floating_point_promotion.hpp>|

      |<boost/mpl/integral_c.hpp>|

  * from |<boost/type_traits/integral_constant.hpp>|

      |<boost/mpl/multiplies.hpp>|

  * from |<boost/type_traits/floating_point_promotion.hpp>|

      |<boost/mpl/next.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/not.hpp>|

  * from |<boost/type_traits/is_virtual_base_of.hpp>|

      |<boost/mpl/or.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/placeholders.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/plus.hpp>|

  * from |<boost/type_traits/floating_point_promotion.hpp>|

      |<boost/mpl/push_back.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/size.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/size_t.hpp>|

  * from |<boost/type_traits/detail/size_t_trait_def.hpp>|

      |<boost/mpl/vector.hpp>|

  * from |<boost/type_traits/floating_point_promotion.hpp>|

      |<boost/mpl/vector/vector0.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

      |<boost/mpl/vector/vector10.hpp>|

  * from |<boost/type_traits/detail/common_type_imp.hpp>|

> (which in turn depends on Type Traits itself), so once the Type Traits
> <-> Typeof cycle is broken, the Type Traits -> MPL dependency will
> also vanish.
>
I agree that independent of MPL there is a cycle, Type Traits <->
Typeof. So let me repeat what I said in another post.

Let everything in place except type_traits.hpp
type_traits/common_type.hpp, which are move to two sub-modules
TypeTraits.All and TypeTraits.CommonType with the following dependencies

TypeTraits.All -> TypeTraits TypeTraits.CommonType
TypeTraits.CommonType -> TypeTraits TypeOf
TypeOf -> TypeTraits

Note again that this has nothing to be with the Type Traits <->MPL cycle.

Best,
Vicente


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