[LLVMbugs] [Bug 15088] New: ambiguous overload resolution for char array

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 28 06:24:24 PST 2013


             Bug #: 15088
           Summary: ambiguous overload resolution for char array
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: joerg.richter at pdv-fs.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

cat > t.cc << EOF
template<class C> void foo( C const* val ) {}
template<int N> void foo( char const (&t) [N] ) {}

template<class T>
void out( T const& t )
  foo( t );

void bar()
  out( "abc" );

clang -c t.cc


t.cc:7:3: error: call to 'foo' is ambiguous
  foo( t );

I am unsure on this one. But I think foo( char const (&t) [N] ) should match

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