[LLVMbugs] [Bug 6707] New: Template argument deduction fails for non-type template parameters with dependent type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 25 11:36:23 PDT 2010


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

           Summary: Template argument deduction fails for non-type
                    template parameters with dependent type
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dgregor at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Example:

terfin:clang dgregor$ cat t.C
template<typename T, T Value>
struct X { };

template<typename T, T Value>
void f(X<T, Value>);

void g(X<int, 10> x) {
  f(x);
}

terfin:clang dgregor$ clang++ t.C
Assertion failed: (false && "Should not see dependent types"), function
getTypeInfo, file
/Volumes/Data/dgregor/Projects/llvm/tools/clang/lib/AST/ASTContext.cpp, line
486.
Stack dump:
0.    Program arguments:
/Volumes/Data/dgregor/Projects/llvm-build-xcode/bin/Debug/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -S -disable-free -main-file-name t.C -pic-level 1
-mdisable-fp-elim -munwind-tables -target-cpu core2 -resource-dir
/Volumes/Data/dgregor/Projects/llvm-build-xcode/bin/lib/clang/1.5
-fmessage-length 80 -stack-protector 1 -fblocks -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/4o/4oX0yyc9FZ0tdikPS5odWE+++TI/-Tmp-/cc-y9VTDU.s -x c++ t.C 
1.    t.C:8:6: current parser token ')'
2.    t.C:7:22: parsing function body 'g'
3.    t.C:7:22: in compound statement ('{}')

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