Subject: Re: [boost] [type_traits][core] modularisation and moving stuff about (again)
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-08-23 09:49:46
On 08/23/18 04:31, Glen Fernandes via Boost wrote:
> Andrey Semashev wrote:
>> I would rather encourage people use type traits, the official
>> interface. Boost.Config or Boost.TypeTraits could provide macros that
>> allow users to detect whether is_final is emulated or is the real
> One thing about this suggestion: If Boost.Config was to provide macros
> that tell users whether Boost.TypeTraits' boost::is_final<T>::value is
> emulated or the real deal, then the compiler detection logic currently
> in Boost.TypeTraits for detecting __is_final would already have to be
> duplicated in Boost.Config. That does not sound like a great idea.
> Right now TypeTraits provides both, which is better. i.e. It provides
> boost::is_final<T>::value and BOOST_IS_FINAL(T). The former uses the
> latter if it is defined, or is always false if not defined.
> If BOOST_IS_FINAL(T) and all its compiler detection logic lives in
> TypeTraits, then that all that compiler detection logic should not be
> duplicated in Config to provide a BOOST_HAS_IS_FINAL_INTRINSIC or
> similar feature detection macro.
I had something like BOOST_HAS_IS_FINAL in mind rather than
BOOST_HAS_IS_FINAL_INTRINSIC. I.e. don't expose intrinsics, keep them an
implementation detail of Boost.TypeTraits. Yes, such a macro is better
placed in Boost.TypeTraits.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk