Your syntax is correct. Try, for instance
#include <iostream>
#include <array>
#include <cstddef>
template<int x, int y> requires y > x
struct cfoobar
{
std::array<double, x> xa;
std::array<double, y> ya;
};
int main()
{
cfoobar<7,5> cf1;
cfoobar<5,7> cf2;
}
GCC 9 output:
g++ -fconcepts -Wall foo.cpp
foo.cpp: In function ‘int main()’:
foo.cpp:16:13: error: template constraint failure
16 | cfoobar<7,5> cf1;
| ^
foo.cpp:16:13: note: constraints not satisfied
foo.cpp:16:13: note: ‘y > x’ evaluated to false
foo.cpp:16:15: warning: unused variable ‘cf1’ [-Wunused-variable]
16 | cfoobar<7,5> cf1;
| ^~~
foo.cpp:17:15: warning: unused variable ‘cf2’ [-Wunused-variable]
17 | cfoobar<5,7> cf2;