[Bug c++/51184] New: Abstract class in function return type
ai.azuma at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 17 08:47:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: ai.azuma@gmail.com
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;
}
///////////////////////
More information about the Gcc-bugs
mailing list