GCC accepts ambiguous overloaded call to empty initializer list while Clang and MSVC rejects the call
The following program is accepted by gcc and edg but rejected by clang and msvc. Demo struct C{}; constexpr int foo(const C&) {return 0;} constexpr int foo(const C(&)[1]) {return 1;} int main() { static_assert(foo({})); // gcc & edg OK while clang & msvc NO } I want to know which clause(s) of the C++ standard makes this ill-formed or well-formed.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.