This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/85254] boost::is_final does not work for template types


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85254

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-04-06
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced to less than 30kloc

namespace boost {

   template <bool val>
   struct integral_constant
   {
      static const bool value = val;
   };

   template <bool val>
   bool const integral_constant<val>::value;

template <class T> struct remove_cv{ typedef T type; };

template <class T> struct is_final
  : integral_constant<__is_final(typename remove_cv<T>::type)> {};

}

struct final1 final {};
template <typename T> struct final2 final {};

static_assert( boost::is_final<final1>::value, "" );
static_assert( boost::is_final<final2<int>>::value, "" );

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]