Код ниже взят из cppref :
#include <string>
using namespace std::literals;
template<typename T>
concept bool EqualityComparable = requires(T a, T b)
{
{
a == b
}
->bool;
};
void f(EqualityComparable&&) {}
int main()
{
f("abc"s);
}
Однако его нельзя скомпилировать с помощью clang-10:
[root@mine ~]# clang++ -std=c++20 -stdlib=libc++ main.cpp
main.cpp:6:14: warning: ISO C++20 does not permit the 'bool' keyword after 'concept' [-Wconcepts-ts-compat]
concept bool EqualityComparable = requires(T a, T b)
~~~~~^
main.cpp:11:7: error: expected concept name with optional arguments
->bool;
^
main.cpp:14:8: error: unknown type name 'EqualityComparable'
void f(EqualityComparable&&) {}
^
1 warning and 2 errors generated.
Is документация cppref не так?