http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51184
Bug #: 51184
Summary: Abstract class in function return type
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 25842
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25842
Outputs by -v option and preprocessed source.
An abstract class shall not be used as a function return type. However, GCC
4.7-20111112 accepts the following code.
///////////////////////
template<typename T>
struct S{};
struct A
{
virtual void f() = 0;
};
int main()
{
S<A(int)> s;
}
///////////////////////