Я попытался построить следующее с помощью g cc 10 -std=gnu++20 -fconcepts
:
template <std::signed_integral T>
class MyClass{ T a; };
template <std::unsigned_integral T>
class MyClass{ T a; };
Почему этот код вызывает следующую ошибку?
> declaration of template parameter ‘class T’ with different constraints
> 55 | template <std::unsigned_integral T>
> | ^~~
Не так ли? быть в порядке?