[Bug c++/85254] boost::is_final does not work for template types
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 6 13:42:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85254
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced a little further:
template <class T> struct remove_cv{ typedef T type; };
template <class T> struct is_final
{
static const bool value = __is_final(typename remove_cv<T>::type);
};
struct final1 final {};
template <typename T> struct final2 final {};
static_assert( is_final<final1>::value, "" );
static_assert( is_final<final2<int>>::value, "" );
This should compile but fails with:
is_final_test.cpp:12:16: error: static assertion failed
static_assert( is_final<final2<int>>::value, "" );
^~~~~~~~~~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list