[LLVMbugs] [Bug 7935] New: Failed template type deduction for multi-dimensional array with const qualifier

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 18 16:48:57 PDT 2010


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

           Summary: Failed template type deduction for multi-dimensional
                    array with const qualifier
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chandlerc at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


% cat t.cc
void f1(const int a[3][3]);

template<typename T>
void f2(const T a[3][3]);

void f3() {
  int a[3][3];
  f1(a);
  f2(a);
}

% ./bin/clang -fsyntax-only t.cc
t.cc:9:3: error: no matching function for call to 'f2'
  f2(a);
  ^~
t.cc:4:6: note: candidate template ignored: can't deduce a type for 'T' which
would make 'T const' equal 'int'
void f2(const T a[3][3]);
     ^
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