[LLVMbugs] [Bug 8001] New: not seeing declaration of constructors for previously declared template class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 26 13:27:10 PDT 2010


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

           Summary: not seeing declaration of constructors for previously
                    declared template class
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=5418)
 --> (http://llvm.org/bugs/attachment.cgi?id=5418)
testcase

The attachment is valid C++ but clang seems to be tripped up by the typedef, as
though the typedef were triggering the instantiation before the definition.

$ clang++ -fsyntax-only b2953197.cc
b2953197.cc:13:16: error: no matching constructor for initialization of
      'Foo<int>::Baz' (aka 'Bar<int>')
 Foo<int>::Baz x;
               ^
b2953197.cc:3:30: note: candidate constructor (the implicit copy constructor)
      not viable: requires 1 argument, but 0 were provided
 template<typename T2> class Bar;
                             ^
1 error generated.

-- 
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.



More information about the llvm-bugs mailing list