https://bugs.llvm.org/show_bug.cgi?id=37833

            Bug ID: 37833
           Summary: Abstract class in function return type
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

The code is as follow:

template<typename T>
struct S{};

struct A
{
 virtual void f() = 0;
};

int main()
{
 S<A(int)> s;
}

An abstract class shall not be used as a function return type, but clang++
accepts the code. 

The code comes from a gcc bug report
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51184).

A previous version of gcc also accepts the code, but it is fixed already.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to