I just tried it on <
https://godbolt.org>, with the code you gave and the
two missing lines:
#include <concepts>
using namespace std;
Current gcc and clang with "--std=c++20 -Wpedantic" are happy with it,
as is MSVC v.19 with "/std:c++latest".
Are you missing some compiler options, or using a different version?
Again - go to <
https://godbolt.org>, try it out on different compiler
versions and you might get an idea of what is going on.