Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish P0768R1 by adding Spaceship CPOs #1370

Merged
merged 21 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
05f1ecc
Implement product code.
StephanTLavavej Jul 17, 2020
e55592f
Add tests.
StephanTLavavej Oct 10, 2020
520e565
Define and test feature-test macro.
StephanTLavavej Jul 14, 2020
eea8d1c
Update general CPO properties test.
StephanTLavavej Oct 15, 2020
8202160
Filed GH issue for wording cleanups.
StephanTLavavej Oct 15, 2020
a8c87ec
Take lvalue references in helper concepts.
StephanTLavavej Oct 15, 2020
c476f62
Move helpers up to <concepts>.
StephanTLavavej Oct 15, 2020
7a52206
Use requires instead of void_t.
StephanTLavavej Oct 15, 2020
ddbb0ae
Use _Choice<_Ty1&, _Ty2&> to reduce template instantiations.
StephanTLavavej Oct 15, 2020
d559a82
Use `else if constexpr` followed by _Always_false for consistency.
StephanTLavavej Oct 15, 2020
3010877
Extract _Can_fallback_eq_lt, rename _Can_fallback_eq_lt_twice.
StephanTLavavej Oct 15, 2020
e75c921
Comment ADL usage.
StephanTLavavej Oct 15, 2020
0e2bf99
Optimize throughput by directly invoking ADL.
StephanTLavavej Oct 15, 2020
d631237
Drop unnecessary `typename = void`.
StephanTLavavej Oct 16, 2020
5dd531f
Fix a corner case in ADL throughput optimization.
StephanTLavavej Oct 16, 2020
f353361
Test weird ADL.
StephanTLavavej Oct 16, 2020
c22a6d4
Merge branch 'master' into ufo_cpos
StephanTLavavej Oct 17, 2020
3d9e550
Merge branch 'master' into ufo_cpos
StephanTLavavej Oct 23, 2020
bae3402
Test the most extreme NaNs.
StephanTLavavej Oct 23, 2020
4ec5693
cstdint must be core so type_traits can include it.
StephanTLavavej Oct 29, 2020
e4f55ce
Merge branch 'master' into ufo_cpos
StephanTLavavej Oct 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions stl/inc/charconv
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#if !_HAS_CXX17
#pragma message("The contents of <charconv> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <float.h>
#include <intrin0.h>
#include <string.h>
#include <xbit_ops.h>
Expand Down Expand Up @@ -1057,60 +1056,6 @@ _NODISCARD inline uint64_t _Divide(_Big_integer_flt& _Numerator, const _Big_inte
// ^^^^^^^^^^ DERIVED FROM corecrt_internal_big_integer.h ^^^^^^^^^^


// vvvvvvvvvv DERIVED FROM corecrt_internal_fltintrn.h vvvvvvvvvv

template <class _FloatingType>
struct _Floating_type_traits;

template <>
struct _Floating_type_traits<float> {
static constexpr int32_t _Mantissa_bits = FLT_MANT_DIG;
static constexpr int32_t _Exponent_bits = sizeof(float) * CHAR_BIT - FLT_MANT_DIG;

static constexpr int32_t _Maximum_binary_exponent = FLT_MAX_EXP - 1;
static constexpr int32_t _Minimum_binary_exponent = FLT_MIN_EXP - 1;

static constexpr int32_t _Exponent_bias = 127;

static constexpr int32_t _Sign_shift = _Exponent_bits + _Mantissa_bits - 1;
static constexpr int32_t _Exponent_shift = _Mantissa_bits - 1;

using _Uint_type = uint32_t;

static constexpr uint32_t _Exponent_mask = (1u << _Exponent_bits) - 1;
static constexpr uint32_t _Normal_mantissa_mask = (1u << _Mantissa_bits) - 1;
static constexpr uint32_t _Denormal_mantissa_mask = (1u << (_Mantissa_bits - 1)) - 1;
static constexpr uint32_t _Special_nan_mantissa_mask = 1u << (_Mantissa_bits - 2);
static constexpr uint32_t _Shifted_sign_mask = 1u << _Sign_shift;
static constexpr uint32_t _Shifted_exponent_mask = _Exponent_mask << _Exponent_shift;
};

template <>
struct _Floating_type_traits<double> {
static constexpr int32_t _Mantissa_bits = DBL_MANT_DIG;
static constexpr int32_t _Exponent_bits = sizeof(double) * CHAR_BIT - DBL_MANT_DIG;

static constexpr int32_t _Maximum_binary_exponent = DBL_MAX_EXP - 1;
static constexpr int32_t _Minimum_binary_exponent = DBL_MIN_EXP - 1;

static constexpr int32_t _Exponent_bias = 1023;

static constexpr int32_t _Sign_shift = _Exponent_bits + _Mantissa_bits - 1;
static constexpr int32_t _Exponent_shift = _Mantissa_bits - 1;

using _Uint_type = uint64_t;

static constexpr uint64_t _Exponent_mask = (1ULL << _Exponent_bits) - 1;
static constexpr uint64_t _Normal_mantissa_mask = (1ULL << _Mantissa_bits) - 1;
static constexpr uint64_t _Denormal_mantissa_mask = (1ULL << (_Mantissa_bits - 1)) - 1;
static constexpr uint64_t _Special_nan_mantissa_mask = 1ULL << (_Mantissa_bits - 2);
static constexpr uint64_t _Shifted_sign_mask = 1ULL << _Sign_shift;
static constexpr uint64_t _Shifted_exponent_mask = _Exponent_mask << _Exponent_shift;
};

// ^^^^^^^^^^ DERIVED FROM corecrt_internal_fltintrn.h ^^^^^^^^^^


// vvvvvvvvvv DERIVED FROM corecrt_internal_strtox.h vvvvvvvvvv

// This type is used to hold a partially-parsed string representation of a floating-point number.
Expand Down
Loading