Annotate noexcept and constexpr with HEDLEY, and add interval containment, ChaCha, and the dyadic range tables.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 20:44:07 -06:00
parent 875f09fec1
commit 0d8a5a8131
97 changed files with 9212 additions and 1159 deletions

View file

@ -174,11 +174,13 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
/// @brief default constructor
/// @details Constructs the `basic_fixed_length_string` with a value
/// corresponding to the empty string.
HEDLEY_NO_THROW
constexpr basic_fixed_length_string() noexcept = default;
/// @brief copy constructor
/// @details Constructs the `basic_fixed_length_string` with a value
/// copied from another `basic_fixed_length_string`.
HEDLEY_NO_THROW
constexpr
basic_fixed_length_string(const basic_fixed_length_string &)
noexcept = default;
@ -186,6 +188,7 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
/// @brief move constructor
/// @details Constructs the `basic_fixed_length_string` from another
/// `basic_fixed_length_string` using move semantics.
HEDLEY_NO_THROW
constexpr
basic_fixed_length_string(basic_fixed_length_string &&)
noexcept = default;
@ -232,6 +235,7 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
/// @brief move assignment
/// @details Assigns the `basic_fixed_length_string` from another
/// `basic_fixed_length_string` using move semantics.
HEDLEY_NO_THROW
constexpr basic_fixed_length_string &
operator=(basic_fixed_length_string &&) noexcept = default;
@ -268,10 +272,12 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
private:
constexpr
// cppcheck-suppress noExplicitConstructor
HEDLEY_NO_THROW
basic_fixed_length_string(integral_type val) // NOLINT(runtime/explicit)
noexcept
: parent::modint(val) { }
HEDLEY_NO_THROW
constexpr basic_fixed_length_string(parent val) noexcept
: parent::modint(val) { }
@ -448,6 +454,7 @@ struct make_from_integral_value<dpf::basic_fixed_length_string<MaxLen, CharT, Al
{
using T = dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc>;
using integral_type = integral_type_from_bitlength_t<bitlength_of_v<T>>;
HEDLEY_NO_THROW
constexpr T operator()(integral_type val) const noexcept
{
return T{val};
@ -499,14 +506,23 @@ class numeric_limits<dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits
= std::numeric_limits<typename keyword_type::integral_type>::traps;
static constexpr bool tinyness_before = false;
HEDLEY_NO_THROW
static constexpr keyword_type min() noexcept { return keyword_type{""}; }
HEDLEY_NO_THROW
static constexpr keyword_type lowest() noexcept { return keyword_type{""}; }
HEDLEY_NO_THROW
static constexpr keyword_type max() noexcept { return ~keyword_type{""}; }
HEDLEY_NO_THROW
static constexpr keyword_type epsilon() noexcept { return 0; }
HEDLEY_NO_THROW
static constexpr keyword_type round_error() noexcept { return 0; }
HEDLEY_NO_THROW
static constexpr keyword_type infinity() noexcept { return 0; }
HEDLEY_NO_THROW
static constexpr keyword_type quiet_NaN() noexcept { return 0; }
HEDLEY_NO_THROW
static constexpr keyword_type signaling_NaN() noexcept { return 0; }
HEDLEY_NO_THROW
static constexpr keyword_type denorm_min() noexcept { return 0; }
};