http://llvm.org/bugs/show_bug.cgi?id=13610
Bug #: 13610
Summary: narrowing conversion in initializer list not treated
as SFINAE condition
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This code should not compile:
template<typename T> decltype(char{sizeof(T)}) f(T*);
void f(...);
auto x = f((char (*)[1000])0);
... because SFINAE should reject the template due to the narrowing error, and
thus we should pick the variadic and fail when auto type deduction deduces
'void'. But we don't, we pick the template, presumably because the narrowing
case is a DefaultError Warning rather than actually being an Error.
--
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