Код: Выделить всё
#include
template requires !std::is_enum_v
void foo(T)
{
}
int main()
{
foo(4); //msvc compile but not gcc and clang
}
Код: Выделить всё
:3:31: error: expression must be enclosed in parentheses
3 | template requires !std::is_enum_v
| ^~~~~~~~~~~~~~~~~~
| ( )
Compiler returned: 1
Подробнее здесь: https://stackoverflow.com/questions/781 ... ted-by-gcc