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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced without any headers:
```
template <typename T, int N>
struct a{};

template<typename T, int N>
constexpr int f(const T (&a)[N])
{
  return N;
}
template<typename T, int N>
constexpr int f(const a<T,N> &a)
{
  return N;
}


template<int N>
struct i{
  constexpr bool operator==(const i &)
    { return true;};
};

template<typename T>
concept StaticSizedRange = requires (T&& t) {
    typename i<f(t)>;
};

template<typename T>
constexpr auto g(T&& t)
{
        return i<f(t)>{};
}

a<int, 5> b;
static_assert(g(b)==g(b));

static_assert(StaticSizedRange<a<int, 5>>);
static_assert(StaticSizedRange<a<int, 5>&>);
static_assert(StaticSizedRange<const a<int, 5>&>);
```


GCC is the only one that accepts the first static_assert which shows that
P2280R4 is at least partially implemented.

Reply via email to