[LLVMbugs] [Bug 11248] New: clang++ generates compilation error due to eager template instantiation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 27 14:52:40 PDT 2011


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

           Summary: clang++ generates compilation error due to eager
                    template instantiation
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: stefan at seefeld.name
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The attached code generates this error:

/home/stefan/test.cc:12:38: error: implicit instantiation of undefined template
'Map<1>'
      (is_same_map<Map<1>, B>::value(Map<1>(), b.block()) &&
                                     ^
/home/stefan/test.cc:1:30: note: template is declared here                      
template <unsigned D> struct Map;
                             ^
1 error generated.   

The code is the result of heavy reduction. The original code obviously defines
the "Map" templates. The point here appears to be that clang++ wants to
instantiate it too early (inside another template !) where the definition
hasn't been seen yet.

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