Code cleanups: Unify _Float_traits and _Floating_type_traits #1442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tr1
:_HAS_WINDOWS_FILESYSTEM
is unused.tr1
, but this was polluting my search for#ifdef _HAS
.cond.cpp
,mutex.cpp
: Usealignof
._Float_traits
usage with_Floating_type_traits
from<type_traits>
._Float_traits
to<xutility>
, Finish P0768R1 by adding Spaceship CPOs #1370 moved_Floating_type_traits
up from<charconv>
to<type_traits>
. We should de-duplicate this machinery now._Floating_type_traits
has all of this content and more (under different names), except for_Float_traits::_Magnitude_mask
. This is used only once in product code (_Float_abs_bits
), where I believe it's simpler to refer to~_Floating_type_traits::_Shifted_sign_mask
(as we're clearly masking away the sign bit), instead of adding_Magnitude_mask
to_Floating_type_traits
.static_assert
that the values are identical._Floating_type_traits
has_Shifted_exponent_mask
(which we want; it's been "shifted" into the proper position for single-precision or double-precision) and_Exponent_mask
(which we do not want). I double-checked that all uses of_Float_traits::_Exponent_mask
were properly converted to_Floating_type_traits::_Shifted_exponent_mask
._Traits
and_Uint_type
typedefs for readability.magnitude_mask_v
; the constants need to be re-ordered which is why the diff looks complicated.