![]() |
Spicy
|
#include <tuple.h>
Public Member Functions | |
| constexpr bool | hasValue (size_t idx) const noexcept |
Protected Member Functions | |
| TupleBase () noexcept=default | |
| TupleBase (tuple::detail::AllSetTag, uint64_t num_elements) | |
| TupleBase (const TupleBase &other) noexcept=default | |
| TupleBase (TupleBase &&other) noexcept=default | |
| void | set (size_t idx) |
| TupleBase & | operator= (const TupleBase &other)=default |
| TupleBase & | operator= (TupleBase &&other)=default |
Static Protected Attributes | |
| static constexpr size_t | MaxElements = 64 |
Friends | |
| auto | operator<=> (const TupleBase &t1, const TupleBase &t2)=default |
Common base class to all tuple types. The base class provides a public function to check if a particular element is set, meaning that one can test this generically without knowing the actual tuple element types.
Internally, the base class performs the state management tracking which elements are set through a bitmask.
For efficiency, we currently limit the maximum number of tuple elements to
|
protecteddefaultnoexcept |
Constructor marking all elements as initially unset.
|
inlineprotected |
Constructor marking all elements as initially set.
| tag | tag to select this constructor |
| num_elements | number of elements in the tuple |
|
inlineconstexprnoexcept |
Returns true if the element at index idx is set. If idx is beyond the number of valid tuple elements the result is undefined.
|
inlineprotected |
Mark a specific element as set.
| idx | index of the element to mark as set |
|
staticconstexprprotected |
Maximum number of tuple elements supported.