CXXIter 0.2
|
Structure holding the bounds of a CXXIter iterator's estimated length. More...
#include <SizeHint.h>
Public Member Functions | |
constexpr size_t | expectedResultSize (size_t min=0) const |
constexpr | SizeHint (size_t lowerBound=0, std::optional< size_t > upperBound={}) |
void | subtract (size_t cnt) |
void | add (const SizeHint &o) |
Static Public Member Functions | |
static constexpr std::optional< size_t > | upperBoundMax (std::optional< size_t > upperBound1, std::optional< size_t > upperBound2) |
static constexpr std::optional< size_t > | upperBoundMin (std::optional< size_t > upperBound1, std::optional< size_t > upperBound2) |
Public Attributes | |
size_t | lowerBound |
std::optional< size_t > | upperBound |
Static Public Attributes | |
static constexpr size_t | INFINITE = std::numeric_limits<size_t>::max() |
Structure holding the bounds of a CXXIter iterator's estimated length.
This structure contains a lowerBound and an optional upper bound. Both are initialized from the source's length (if any), and subsequently edited by chained iteration accordingly.
Definition at line 15 of file SizeHint.h.
|
inlineconstexpr |
Definition at line 23 of file SizeHint.h.
|
inline |
Definition at line 40 of file SizeHint.h.
|
inlineconstexpr |
Definition at line 21 of file SizeHint.h.
|
inline |
Definition at line 34 of file SizeHint.h.
|
inlinestaticconstexpr |
Definition at line 25 of file SizeHint.h.
|
inlinestaticconstexpr |
Definition at line 29 of file SizeHint.h.
|
staticconstexpr |
Definition at line 16 of file SizeHint.h.
size_t CXXIter::SizeHint::lowerBound |
Definition at line 18 of file SizeHint.h.
std::optional<size_t> CXXIter::SizeHint::upperBound |
Definition at line 19 of file SizeHint.h.