template requires all_arithmetic constexpr int h() { return 1; }
template requires all_floating_point constexpr int h() { return 2; }
// ------------------------------------
static_assert(f() == 1); // ok static_assert(f() == 2); // ok
static_assert(g() == 1); // ok static_assert(g() == 2); // ok
static_assert(h() == 1); // ok static_assert(h() == 2); // error (why is this not resolved even after p2963?)
int main() {} < /code> ошибка: < /p> :67:15: error: call to 'h' is ambiguous 67 | static_assert(h() == 2); // error (why is this not resolved even after p2963?) | ^~~~~~~~~ [/code] https://godbolt.org/z/jnye1jqqm образно пакет параметров эквивалентны, а арифметика submers floating_point . Я не знаю, почему именование сгиба>
является той проблемой с проблемой компилятора macos g ++ (при использовании оптимизации)?
Проблема состоит в том, что при распределении с () или {} объектом с пустым конструктором, компилятор неверно думает, что объект ненициализируется, и, таким...