[LLVMbugs] [Bug 8295] New: clang doesn't complain about partial template function specializations

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 4 09:33:04 PDT 2010


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

           Summary: clang doesn't complain about partial template function
                    specializations
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


hummer:src thakis$ cat testspec.cc 
template <class T>
void f(const T& t) {
}

template <class c>
struct C {
};

template <class A>
void f<C<A> >(const C<A>& t) {
}

# clang doesn't complain:
hummer:src thakis$ ~/src/llvm/Release+Asserts/bin/clang -c testspec.cc 

# gcc does:
hummer:src thakis$ gcc -c testspec.cc 
testspec.cc:10: error: function template partial specialization ‘f<C<A> >’ is
not allowed

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