https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114118
Bug ID: 114118 Summary: std::is_floating_point<_Float32> and __is_floating<_Float32> are false in C++20 and older Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- Since GCC 13 we defined _Float32 etc. as distinct types, but the library only considers them to be floating-point types for C++23 and later, when <stdfloat> declares the aliases std::float32_t etc. This means that the proposed solution for PR 114018 only works in C++23: // _GLIBCXX_RESOLVE_LIB_DEFECTS // 3790. P1467 accidentally changed nexttoward's signature template<typename _Tp> typename __gnu_cxx::__enable_if<__is_floating<_Tp>::__value, _Tp>::__type nexttoward(_Tp, long double) = delete; // not defined for extended FP types For C++20 std::nexttoward(_Float32(0), 0.0L) compiles and selects the float overload. To consistently delete them we would need to do: #if __FLT32_DIG__ void nexttoward(_Float32, long double) = delete; #endif We should probably just make __is_floating<_Float32> true for all -std modes. And also define __gnu_cxx::__numeric_traits<_Float32>.