This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85254] boost::is_final does not work for template types
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Apr 2018 13:28:13 +0000
- Subject: [Bug c++/85254] boost::is_final does not work for template types
- Auto-submitted: auto-generated
- References: <bug-85254-4@http.gcc.gnu.org/bugzilla/>
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, "" );