Код: Выделить всё
int main()
{
using nil = decltype(nullptr) ;
constexpr nil zero = nullptr ;
constexpr nil other_zero = zero ;
}
Код: Выделить всё
test.cpp: In function ‘int main()’:
test.cpp:5:30: error: ‘nullptr’ is not a constant expression
5 | constexpr nil other_zero = zero ;
| ^~~~
Подробнее здесь: https://stackoverflow.com/questions/798 ... expression
Мобильная версия