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
|
|
@ -80,16 +80,20 @@ class subsequence_iterable
|
|||
|
||||
using subsequence_iterator_type = points_iterator;
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
constexpr const_iterator(output_iterator out_it, subsequence_iterator_type it) noexcept
|
||||
: out_it_{out_it}, it_{it}
|
||||
{ }
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
constexpr const_iterator(const_iterator &&) noexcept = default;
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
constexpr const_iterator(const const_iterator &) noexcept = default;
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator & operator=(const_iterator &&) noexcept = default;
|
||||
const_iterator & operator=(const const_iterator &) = default;
|
||||
~const_iterator() = default;
|
||||
|
|
@ -143,11 +147,13 @@ class subsequence_iterable
|
|||
return *this;
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator operator+(std::size_t n) const noexcept
|
||||
{
|
||||
return const_iterator(out_it_ + outputs_per_leaf*n, it_ + n);
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator & operator-=(std::size_t n) noexcept
|
||||
{
|
||||
it_ -= n;
|
||||
|
|
@ -155,16 +161,19 @@ class subsequence_iterable
|
|||
return *this;
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator operator-(std::size_t n) const noexcept
|
||||
{
|
||||
return const_iterator(out_it_ - outputs_per_leaf*n, it_ - n);
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
difference_type operator-(const_iterator rhs) const noexcept
|
||||
{
|
||||
return it_ - rhs.it_;
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
reference operator[](std::size_t i) const noexcept
|
||||
{
|
||||
return out_it_[i*outputs_per_leaf + mod(it_[i], lg_outputs_per_leaf)];
|
||||
|
|
@ -279,17 +288,21 @@ class recipe_subsequence_iterable
|
|||
|
||||
using subsequence_iterator_type = typename std::vector<std::size_t>::const_iterator;
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
constexpr const_iterator(output_iterator out_it, subsequence_iterator_type it) noexcept
|
||||
: out_it_{out_it}, it_{it}
|
||||
{ }
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
constexpr const_iterator(const_iterator &&) noexcept = default;
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
constexpr const_iterator(const const_iterator &) noexcept = default;
|
||||
|
||||
const_iterator & operator=(const const_iterator &) = default;
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator & operator=(const_iterator &&) noexcept = default;
|
||||
~const_iterator() = default;
|
||||
|
||||
|
|
@ -339,27 +352,32 @@ class recipe_subsequence_iterable
|
|||
return *this;
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator operator+(std::size_t n) const noexcept
|
||||
{
|
||||
return const_iterator(out_it_, it_ + n);
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator & operator-=(std::size_t n) noexcept
|
||||
{
|
||||
it_ -= n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
const_iterator operator-(std::size_t n) const noexcept
|
||||
{
|
||||
return const_iterator(out_it_, it_ - n);
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
difference_type operator-(const_iterator rhs) const noexcept
|
||||
{
|
||||
return it_ - rhs.it_;
|
||||
}
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
reference operator[](std::size_t i) const noexcept
|
||||
{
|
||||
return out_it_[it_[i]];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue