https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123550
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Started with r16-6352-g4d02f20772f170b78491769a78086c92de127f95
> Are you sure it is valid though?
> Though, clang++ accepts it.
To make it 100% valid you need to include compare to get the definition of
std::strong_ordering but I don't see why it would not be valid. it is a lambda
as the default template argument and that defines a local type (LocalType)
which has an operator<=> in it. In C++20 you can define a lambda as a default
template argument. Local types inside lambda is always valid.
```
#include <compare>
template <auto = [] {
struct LocalType {
auto operator<=>(const LocalType &other) const = default;
};
constexpr LocalType a, b;
static_assert(noexcept(a <=> b), "");
}> struct s1{};
s1<> t;
```
What I am not sure of is if this should be a P1. As we have have issues with
local types in lambdas still (PR 103901).