Boost logo

Boost :

Subject: Re: [boost] [type_traits][core] modularisation and moving stuff about (again)
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2018-08-23 01:31:11


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

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.

Glen


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