struct A
{
template<typename T>
concept IsGood = sizeof(T) == sizeof(int);
// error: concept declarations may only appear in global or namespace scope
void f(IsGood auto n)
{}
};
int main()
{
A{}.f(8);
}
See online demo: https://godbolt.org/z/fv5fePdbf
Now that we can define a class nested in another class, then,
Why does C++20 not allow a concept declared nested in a class?