https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128848

            Bug ID: 128848
           Summary: GCC accepts ambiguous overloaded call to empty
                    initializer list while Clang and MSVC rejects the call
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jlame646 at gmail dot com
  Target Milestone: ---

The following program is accepted by gcc and edg but rejected by clang and
msvc. [Demo](https://godbolt.org/z/1j8v9P4aY)

```
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
}
```

This seems to be ill-formed to me. Here is the releated thread:
https://stackoverflow.com/q/80017425/12002570

Reply via email to