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:
parent
875f09fec1
commit
0d8a5a8131
97 changed files with 9212 additions and 1159 deletions
|
|
@ -39,6 +39,7 @@ inline thread_local void (*uniform_bytes_hook)(void *, std::size_t) = nullptr;
|
|||
|
||||
template <typename T>
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
HEDLEY_NO_THROW
|
||||
bool fill_from_hook(T & buf) noexcept
|
||||
{
|
||||
if (uniform_bytes_hook == nullptr)
|
||||
|
|
@ -52,6 +53,7 @@ bool fill_from_hook(T & buf) noexcept
|
|||
/// `bool` and `enum : bool` (including `dpf::bit`) have only two valid
|
||||
/// representations. Filling them with a raw entropy byte is undefined.
|
||||
template <typename T>
|
||||
HEDLEY_NO_THROW
|
||||
constexpr bool is_boolean_representation() noexcept
|
||||
{
|
||||
using U = std::remove_cv_t<T>;
|
||||
|
|
@ -94,7 +96,8 @@ struct entropy_source
|
|||
entropy_source(entropy_source &&) = delete;
|
||||
entropy_source & operator=(entropy_source &&) = delete;
|
||||
|
||||
~entropy_source()
|
||||
HEDLEY_NO_THROW
|
||||
~entropy_source() noexcept
|
||||
{
|
||||
if (fp != nullptr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue