http://llvm.org/bugs/show_bug.cgi?id=9548
Summary: "no known conversion from 'vector<string>' to
'vector<string>'"
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
$ cat test.cc
class versa_string;
typedef versa_string string;
namespace std {template <typename T> class vector;}
using std::vector;
void f(vector<string> v);
namespace std {
class basic_string;
typedef basic_string string;
template <typename T> class vector {};
void g() {
vector<string> v;
f(v);
}
}
$ clang -fsyntax-only test.cc
test.cc:15:3: error: no matching function for call to 'f'
f(&v);
^
test.cc:7:6: note: candidate function not viable: no known conversion from
'vector<string>' to 'vector<string>' for 1st argument
void f(vector<string> v);
^
1 error generated.
Wait, no known conversion from what to what?
If 'string' is a class rather than a typedef, we print "... from
'vector<std::string>...". If 'string' is the bare parameter type rather than a
template argument in the parameter type, we print "... from 'string' (aka
'std::basic_string'...". Either of these styles would avoid printing textually
identical types in the note.
--
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