http://llvm.org/bugs/show_bug.cgi?id=13485

             Bug #: 13485
           Summary: Templates mess up return type covariance analysis
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


Created attachment 8966
  --> http://llvm.org/bugs/attachment.cgi?id=8966
failing test case

test.cpp:9:15: error: return type of virtual function 'foo' is not covariant
      with the return type of the function it overrides ('C *' is not derived
      from 'A *')
  virtual TC *foo() {return this;};
              ^
test.cpp:12:18: note: in instantiation of template class 'B<C>' requested here
class C : public B<C>
                 ^
test.cpp:4:14: note: overridden virtual function is here
  virtual A* foo()=0;
             ^
1 error generated.


C is derived from A through B<C>

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to