[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
http://llvm.org/bugs/show_bug.cgi?id=15088
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" );
}
EOF
clang -c t.cc
Gives:
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
better.
--
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