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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to