https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I know cppreference is not the standard exactly but it does have the following about nexttoward: However, an invocation of std::nexttoward is ill-formed if the argument corresponding to from has extended floating-point type https://en.cppreference.com/w/cpp/numeric/math/nextafter So maybe this is invalid after all.