[Bug c++/62085] New: SFINAE where specialization parameter class member returns an abstract type fails
jameslyon0 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Aug 10 20:24:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62085
Bug ID: 62085
Summary: SFINAE where specialization parameter class member
returns an abstract type fails
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jameslyon0 at gmail dot com
The attached code fails to compile with:
sfinae.cpp: In instantiation of ‘struct A<C>’:
sfinae.cpp:14:8: required from here
sfinae.cpp:3:5: error: invalid abstract return type ‘C’
T f();
^
sfinae.cpp:9:8: note: because the following virtual functions are pure within
‘C’:
struct C {
^
sfinae.cpp:10:11: note: virtual C::~C()
virtual ~C() = 0;
I'm not an expert on the C++ standard, but I would expect the partial
specialization of B to be excluded by SFINAE rather than getting a compiler
error (clang accepts the code).
Looking at previous bugs, it seems that #12672 might be related.
More information about the Gcc-bugs
mailing list