Код: Выделить всё
g++ (Debian 14.2.0-7) 14.2.0Код: Выделить всё
template
T test(void) {
constexpr auto one = T (1);
constexpr auto oneThird = one / (T) 3;
return oneThird;
}
int main() {
test();
test();
return 0;
}
: 4:34: ошибка: '(1.0e+0l / 3.0e+0l)' не является постоянным выражением
Например. https://godbolt.org/z/WoTEfs39z
Это просто ошибка в gcc? (
Код: Выделить всё
clangПодробнее здесь: https://stackoverflow.com/questions/791 ... on-ppc64el
Мобильная версия