http://llvm.org/bugs/show_bug.cgi?id=21803
Bug ID: 21803
Summary: wordsmith viable conversion error message for function
return type
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Testcase:
template<typename A, typename B = int> class X {};
X<float> f() {
return X<float, double>();
}
$ clang b13910958.cc -fsyntax-only
b13910958.cc:4:10: error: no viable conversion from 'X<[...], double>' to
'X<[...], (default) int>'
return X<float, double>();
^~~~~~~~~~~~~~~~~~
b13910958.cc:1:46: note: candidate constructor (the implicit copy constructor)
not viable: no known conversion from 'X<float, double>' to
'const X<float, int> &' for 1st argument
template<typename A, typename B = int> class X {};
^
1 error generated.
Better would be "error: no viable conversion from returned value of type
'X<[...], double>' to function return type 'X<[...], (default) int>'"
--
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