https://bugs.llvm.org/show_bug.cgi?id=45331
Bug ID: 45331
Summary: clang incorrectly truncates integer in list
initialization in SFINAE context
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
struct A { signed char a; constexpr A(signed char a) : a(a) {} };
template<int x> constexpr A f(int y, int (*z)[A{x}.a] = 0) { return A(1); }
template<int x> constexpr A f(char* y) { return A(2); }
static_assert(f<257>(0).a == 2, "Should pick second overload");
gcc accepts, clang rejects. I think gcc is right?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs