This program
```
struct A {
friend constexpr bool operator ==(const A &, const A &) noexcept = default;
};
constexpr bool operator ==(const A &, const A &) noexcept;
static_assert( A{} == A{} );
```
looks valid and it is accepted by EDG and MSVC. But Clang rejects it with the error
> undefined function 'operator==' cannot be used in a constant expression
GCC unfortunately has a similar issue.
Online demo: https://gcc.godbolt.org/z/azqbosPTd
Related discussion: https://stackoverflow.com/q/78889523/7325599
This program
looks valid and it is accepted by EDG and MSVC. But Clang rejects it with the error
GCC unfortunately has a similar issue.
Online demo: https://gcc.godbolt.org/z/azqbosPTd
Related discussion: https://stackoverflow.com/q/78889523/7325599