https://llvm.org/bugs/show_bug.cgi?id=24258
Bug ID: 24258 Summary: convert type trait errors to english Product: clang Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: nlewy...@google.com CC: dgre...@apple.com, llvmbugs@cs.uiuc.edu Classification: Unclassified The standard defines a pile of type traits like "is_convertible" (also, "is_same", "is_base_of", "is_bind_expression", "is_placeholder", "is_void", "is_constructable", ...) and we currently don't issue the best errors for these. $ cat b16776752-2.cc #include <type_traits> using namespace std; struct X {}; struct Y {}; template<class U1, class U2, class = typename enable_if<is_convertible<U1, U2>::value>::type> constexpr void f(); void test() { f<X, Y>(); } $ clang++ -std=c++14 b16776752-2.cc b16776752-2.cc:12:3: error: no matching function for call to 'f' f<X, Y>(); ^~~~~~~ b16776752-2.cc:8:37: note: candidate template ignored: disabled by 'enable_if' [with U1 = X, U2 = Y] class = typename enable_if<is_convertible<U1, U2>::value>::type> ^ 1 error generated. We should instead issue a note that "U1 is not convertible to U2" (given that this is also a context where the is_convertible must resolve to true). -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs