Код: Выделить всё
template
struct Base
{
int array[TDerived::NValue];
};
template
struct Derived : Base
{
constexpr static int NValue = N;
};
int main()
{
Derived derived;
}
< /code>
Ошибка бросков VS2022: 'nvalue': не является членом «полученного '< /p>
Я должен использовать отдельную структуру признака?template
struct Base
{
int array[N];
};
template
struct Derived : Base
{
};
int main()
{
Derived derived;
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... base-class
Мобильная версия