libstdc++: Fix -Wunused-local-typedefs warning in <compare>

libstdc++-v3/ChangeLog:

	* libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
	inside #if condition.
This commit is contained in:
Jonathan Wakely 2022-03-04 10:43:29 +00:00
parent 49bc9c6c1e
commit 289f65d643
1 changed files with 2 additions and 2 deletions

View File

@ -850,8 +850,6 @@ namespace std
return strong_ordering::equal; // All bits are equal, we're done.
using enum _Fp_fmt;
using _Int = decltype(__ix);
constexpr auto __fmt = _S_fp_fmt<_Tp>();
if constexpr (__fmt == _Dbldbl) // double-double
@ -899,6 +897,8 @@ namespace std
// bit to be reversed. Flip that to give desired ordering.
if (__builtin_isnan(__x) && __builtin_isnan(__y))
{
using _Int = decltype(__ix);
constexpr int __nantype = __fmt == _Binary32 ? 22
: __fmt == _Binary64 ? 51
: __fmt == _Binary128 ? 111