Subject: Re: [boost] [type_traits][core] modularisation and moving stuff about (again)
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2018-08-23 11:28:23
On Thu, Aug 23, 2018 at 7:22 AM Andrey Semashev wrote:
> I gathered that you intended to use BOOST_IS_FINAL as a way to access a
> compiler intrinsic, i.e. use it in place of the type trait.
Either in place of, or in addition to (doesn't matter to me) but not
the type trait alone. Because the trait alone is inadequate, as I
> I didn't find those macros documented. Specifically for BOOST_IS_FINAL,
> it is mentioned as a *way to detect* whether `boost::is_final` gives the
> actual result and not just `false`. The docs don't say that
> BOOST_IS_FINAL is a way to access compiler intrinsics, so if someone is
> using it this way, he is relying on implementation details.
They're documented here:
"The hooks for compiler-intrinsic support are defined in
boost/type_traits/intrinsics.hpp, adding support for new compilers is
simply a matter of defining one of more of the following macros:"
"BOOST_IS_FINAL(T) | Should evaluate to true if T is a class type
declared with the final specifier"