[Bug c++/69903] Function template specialization with CRTP-class causes compiler segfault
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 25 18:21:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69903
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Looks like you don't need to use CRTP to trigger the segfault:
template <typename T>
struct A {
template <int i>
static void f() { };
static void F() { f<0>(); }
};
struct B : A<int> { };
template<>
void B::f<0>() { };
int main() {
B::F();
}
I wonder if this code is valid, though. Is it legal to declare an explicit
specialization of an inherited template function like that?
More information about the Gcc-bugs
mailing list