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 mentioned before.
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: https://www.boost.org/doc/libs/1_68_0/libs/type_traits/doc/html/boost_typetr... Which says: "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:" And below: "BOOST_IS_FINAL(T) | Should evaluate to true if T is a class type declared with the final specifier" Glen