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, "" ); ^~~~~~~~~~~~~~~~~~~~~