RPNX::DataStructures
Header-only C++ data structures and supporting utilities.
Loading...
Searching...
No Matches
rpnx Namespace Reference

Containers, iterator adapters, callable wrappers, and value utilities. More...

Classes

class  annex
 Optional-like value container that stores its payload out of line. More...
 
class  basic_variant
 Heap-backed tagged union with allocator-aware storage. More...
 
class  bidirectional_bounded_iterator
 Random-access iterator adapter with bidirectional range checks. More...
 
class  bounded_iterator
 Forward iterator adapter that checks access against an end sentinel. More...
 
class  conc_sharded_unordered_map
 
class  const_function
 
class  dyn_bidirectional_input_iter
 Owning type-erased bidirectional input iterator. More...
 
class  dyn_comparable_input_iter
 Owning type-erased input iterator with equality and ordering. More...
 
class  dyn_input_iter
 Owning type-erased input iterator that yields values by copy. More...
 
class  dyn_input_range
 Lightweight range of type-erased comparable input iterators. More...
 
class  dyn_output_iter
 Owning type-erased output iterator. More...
 
class  dynar
 Dynamic array container with size-first ordering. More...
 
class  function
 
class  function< R(Args...) >
 Owning, copyable type-erased callable with small-buffer optimization. More...
 
class  hadix_table
 Reserved prototype for a hadix map. More...
 
struct  index_of
 
struct  index_of< T, T, Ts... >
 
struct  index_of< T, U, Ts... >
 
class  map
 Ordered key-value container with size-first ordering. More...
 
class  result
 A generic result class that can hold either a value or an exception. More...
 
class  result< void >
 Specialization of the result class for void type. More...
 
class  segmented_dynar
 Dynamic array backed by exponentially sized stable segments. More...
 
class  set
 Ordered unique-key container with size-first ordering. More...
 
class  type_info_holder
 Provides one stable RTTI identity object per type. More...
 
class  uint64_base
 CRTP base for strongly typed unsigned 64-bit integer wrappers. More...
 
class  variant_convert_to
 Visitor that assigns its argument into a target variant. More...
 
class  variant_detail
 Allocator-aware erased operations used by basic_variant. More...
 
class  variant_nth_member
 Obtains an alternative type by index. More...
 
class  variant_nth_member< rpnx::basic_variant< A, Vs... >, N >
 variant_nth_member specialization for basic_variant. More...
 
class  variant_size
 Obtains the number of alternatives in a variant type. More...
 
class  variant_size< rpnx::basic_variant< A, Vs... > >
 variant_size specialization for basic_variant. More...
 
class  writer
 

Typedefs

template<typename... Ts>
using variant = basic_variant< std::allocator< void >, Ts... >
 Convenience alias for a variant using std::allocator<void>.
 
template<typename V, typename F, typename R>
using variant_invoke_executor = R (*)(V&&, F&&)
 Function-pointer type for one erased visitor dispatch entry.
 
template<typename V, std::size_t N>
using variant_nth_member_t = typename variant_nth_member< V, N >::type
 Alternative type at an index.
 

Enumerations

enum class  call_type { required , optional , except_on_missing }
 Policy used when a visitor cannot accept an active alternative. More...
 
enum class  dispatch_type { automatic , branching , indirect }
 Strategy used to dispatch a visitor to an active alternative. More...
 

Functions

template<typename T, typename Alloc>
void swap (annex< T, Alloc > &lhs, annex< T, Alloc > &rhs) noexcept(noexcept(lhs.swap(rhs)))
 Swaps two annex objects.
 
template<typename T>
annex< std::decay_t< T > > make_annex (T &&value)
 Constructs an annex containing a decayed copy of a value.
 
template<typename T, typename... Args>
annex< T > make_annex (Args &&... args)
 Constructs an annex containing a T constructed in place.
 
template<typename T, typename U, typename... Args>
annex< T > make_annex (std::initializer_list< U > init, Args &&... args)
 Constructs an annex containing a T from an initializer list.
 
template<typename T, typename Allocator>
void swap (dynar< T, Allocator > &lhs, dynar< T, Allocator > &rhs) noexcept(noexcept(lhs.swap(rhs)))
 Swaps two dynars.
 
template<typename T, typename Allocator>
bool operator== (dynar< T, Allocator > const &lhs, dynar< T, Allocator > const &rhs)
 Compares two dynars for equality.
 
template<typename T, typename Allocator>
bool operator!= (dynar< T, Allocator > const &lhs, dynar< T, Allocator > const &rhs)
 Compares two dynars for inequality.
 
template<typename T, typename Allocator>
bool operator< (dynar< T, Allocator > const &lhs, dynar< T, Allocator > const &rhs)
 Orders two dynars by size first, then by the underlying vector ordering.
 
template<typename T, typename Allocator>
bool operator> (dynar< T, Allocator > const &lhs, dynar< T, Allocator > const &rhs)
 Orders two dynars by size first, then by the underlying vector ordering.
 
template<typename T, typename Allocator>
bool operator<= (dynar< T, Allocator > const &lhs, dynar< T, Allocator > const &rhs)
 Orders two dynars by size first, then by the underlying vector ordering.
 
template<typename T, typename Allocator>
bool operator>= (dynar< T, Allocator > const &lhs, dynar< T, Allocator > const &rhs)
 Orders two dynars by size first, then by the underlying vector ordering.
 
template<typename T, typename Allocator>
auto operator<=> (dynar< T, Allocator > const &lhs, dynar< T, Allocator > const &rhs) -> decltype(std::declval< typename dynar< T, Allocator >::underlying_type const & >()<=> std::declval< typename dynar< T, Allocator >::underlying_type const & >())
 Three-way compares two dynars by size first, then by the underlying vector ordering.
 
template<class It>
constexpr bidirectional_bounded_iterator< It > make_bounded_iterator (It it, It first, It last) noexcept
 Creates a two-sided bounded random-access iterator.
 
template<class It>
constexpr bounded_iterator< It > make_bounded_iterator (It it, It last) noexcept
 Creates an upper-bounded forward iterator.
 
template<typename Key, typename T, typename Compare, typename Allocator>
void swap (map< Key, T, Compare, Allocator > &lhs, map< Key, T, Compare, Allocator > &rhs) noexcept(noexcept(lhs.swap(rhs)))
 Swaps two maps.
 
template<typename Key, typename T, typename Compare, typename Allocator>
bool operator== (map< Key, T, Compare, Allocator > const &lhs, map< Key, T, Compare, Allocator > const &rhs)
 Compares two maps for equality.
 
template<typename Key, typename T, typename Compare, typename Allocator>
bool operator!= (map< Key, T, Compare, Allocator > const &lhs, map< Key, T, Compare, Allocator > const &rhs)
 Compares two maps for inequality.
 
template<typename Key, typename T, typename Compare, typename Allocator>
bool operator< (map< Key, T, Compare, Allocator > const &lhs, map< Key, T, Compare, Allocator > const &rhs)
 Orders two maps by size first, then by the underlying map ordering.
 
template<typename Key, typename T, typename Compare, typename Allocator>
bool operator> (map< Key, T, Compare, Allocator > const &lhs, map< Key, T, Compare, Allocator > const &rhs)
 Orders two maps by size first, then by the underlying map ordering.
 
template<typename Key, typename T, typename Compare, typename Allocator>
bool operator<= (map< Key, T, Compare, Allocator > const &lhs, map< Key, T, Compare, Allocator > const &rhs)
 Orders two maps by size first, then by the underlying map ordering.
 
template<typename Key, typename T, typename Compare, typename Allocator>
bool operator>= (map< Key, T, Compare, Allocator > const &lhs, map< Key, T, Compare, Allocator > const &rhs)
 Orders two maps by size first, then by the underlying map ordering.
 
template<typename Key, typename T, typename Compare, typename Allocator>
auto operator<=> (map< Key, T, Compare, Allocator > const &lhs, map< Key, T, Compare, Allocator > const &rhs) -> decltype(std::declval< typename map< Key, T, Compare, Allocator >::underlying_type const & >()<=> std::declval< typename map< Key, T, Compare, Allocator >::underlying_type const & >())
 Three-way compares two maps by size first, then by the underlying map ordering.
 
void poison_region (void *ptr, std::size_t size)
 Marks a memory region as poisoned when instrumentation is enabled.
 
template<typename Key, typename Compare, typename Allocator>
void swap (set< Key, Compare, Allocator > &lhs, set< Key, Compare, Allocator > &rhs) noexcept(noexcept(lhs.swap(rhs)))
 Swaps two sets.
 
template<typename Key, typename Compare, typename Allocator>
bool operator== (set< Key, Compare, Allocator > const &lhs, set< Key, Compare, Allocator > const &rhs)
 Compares two sets for equality.
 
template<typename Key, typename Compare, typename Allocator>
bool operator!= (set< Key, Compare, Allocator > const &lhs, set< Key, Compare, Allocator > const &rhs)
 Compares two sets for inequality.
 
template<typename Key, typename Compare, typename Allocator>
bool operator< (set< Key, Compare, Allocator > const &lhs, set< Key, Compare, Allocator > const &rhs)
 Orders two sets by size first, then lexicographically.
 
template<typename Key, typename Compare, typename Allocator>
bool operator> (set< Key, Compare, Allocator > const &lhs, set< Key, Compare, Allocator > const &rhs)
 Orders two sets by size first, then lexicographically.
 
template<typename Key, typename Compare, typename Allocator>
bool operator<= (set< Key, Compare, Allocator > const &lhs, set< Key, Compare, Allocator > const &rhs)
 Orders two sets by size first, then lexicographically.
 
template<typename Key, typename Compare, typename Allocator>
bool operator>= (set< Key, Compare, Allocator > const &lhs, set< Key, Compare, Allocator > const &rhs)
 Orders two sets by size first, then lexicographically.
 
template<typename Key, typename Compare, typename Allocator>
auto operator<=> (set< Key, Compare, Allocator > const &lhs, set< Key, Compare, Allocator > const &rhs) -> decltype(std::declval< typename set< Key, Compare, Allocator >::underlying_type const & >()<=> std::declval< typename set< Key, Compare, Allocator >::underlying_type const & >())
 Three-way compares two sets by size first, then lexicographically.
 
template<typename T, typename... Ts>
constexpr auto & get_as (variant< Ts... > &v)
 Retrieves a mutable alternative by type.
 
template<typename T, typename... Ts>
constexpr auto const & get_as (variant< Ts... > const &v)
 Retrieves an immutable alternative by type.
 
template<typename V, typename F, typename R, std::size_t N, call_type C>
apply_nth_visitor (V &&variant, F &&func)
 Invokes a visitor for one compile-time alternative index.
 
template<std::size_t NBegin, std::size_t NEnd, typename V, typename F, typename R, call_type C>
apply_nth_visitor_branched (std::size_t index, V &&variant, F &&func)
 Dispatches an alternative index through a compile-time binary branch tree.
 
template<typename F, typename R, typename A, typename... Vs>
auto consteval variant_invoke_table_gen ()
 Generates the legacy lvalue visitor dispatch table.
 
template<std::size_t N, typename F, typename R, typename V, call_type C>
constexpr void update_variant_invoke_table2 (std::array< variant_invoke_executor< V, F, R >, variant_size_v< std::remove_cvref_t< V > > > &table)
 Populates visitor dispatch-table entries recursively.
 
template<typename F, typename R, typename V, call_type C>
auto constexpr variant_invoke_table_gen2 ()
 Generates a visitor dispatch table.
 
template<typename R, dispatch_type D = dispatch_type::automatic, typename V, typename F>
apply_visitor (V &&variant, F &&func)
 Invokes a visitor for the active alternative.
 
template<typename R, typename V, typename F>
apply_visitor_checked (V &&variant, F &&func)
 Invokes a visitor and throws when it does not accept the active alternative.
 
template<typename R, typename V, typename F>
try_apply_visitor (V &&variant, F &&func)
 Invokes a visitor only when it accepts the active alternative.
 
Annex-to-annex comparisons

Empty annex values compare equal to each other and less than any annex containing a value. Engaged annex values compare through their contained values.

template<typename T, typename Alloc>
bool operator== (annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
 Compares two annex objects for equality.
 
template<typename T, typename Alloc>
bool operator!= (annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
 Compares two annex objects for inequality.
 
template<typename T, typename Alloc>
bool operator< (annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
 Orders two annex objects.
 
template<typename T, typename Alloc>
bool operator> (annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
 Orders two annex objects.
 
template<typename T, typename Alloc>
bool operator<= (annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
 Orders two annex objects.
 
template<typename T, typename Alloc>
bool operator>= (annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
 Orders two annex objects.
 
template<typename T, typename Alloc>
requires requires(T const& lhs, T const& rhs) { lhs <=> rhs; }
auto operator<=> (annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs) -> decltype(*lhs<=> *rhs)
 Three-way compares two annex objects when T supports <=>.
 
Annex-to-nullopt comparisons

Empty annex values compare equal to std::nullopt; engaged annex values compare greater than std::nullopt.

template<typename T, typename Alloc>
bool operator== (annex< T, Alloc > const &lhs, std::nullopt_t) noexcept
 Tests whether an annex is empty.
 
template<typename T, typename Alloc>
bool operator== (std::nullopt_t, annex< T, Alloc > const &rhs) noexcept
 Tests whether an annex is empty.
 
template<typename T, typename Alloc>
bool operator!= (annex< T, Alloc > const &lhs, std::nullopt_t) noexcept
 Tests whether an annex contains a value.
 
template<typename T, typename Alloc>
bool operator!= (std::nullopt_t, annex< T, Alloc > const &rhs) noexcept
 Tests whether an annex contains a value.
 
template<typename T, typename Alloc>
bool operator< (annex< T, Alloc > const &, std::nullopt_t) noexcept
 Returns false because an annex is never less than std::nullopt.
 
template<typename T, typename Alloc>
bool operator< (std::nullopt_t, annex< T, Alloc > const &rhs) noexcept
 Tests whether std::nullopt is less than an annex.
 
template<typename T, typename Alloc>
bool operator<= (annex< T, Alloc > const &lhs, std::nullopt_t) noexcept
 Tests whether an annex is less than or equal to std::nullopt.
 
template<typename T, typename Alloc>
bool operator<= (std::nullopt_t, annex< T, Alloc > const &) noexcept
 Returns true because std::nullopt is less than or equal to any annex.
 
template<typename T, typename Alloc>
bool operator> (annex< T, Alloc > const &lhs, std::nullopt_t) noexcept
 Tests whether an annex is greater than std::nullopt.
 
template<typename T, typename Alloc>
bool operator> (std::nullopt_t, annex< T, Alloc > const &) noexcept
 Returns false because std::nullopt is never greater than an annex.
 
template<typename T, typename Alloc>
bool operator>= (annex< T, Alloc > const &, std::nullopt_t) noexcept
 Returns true because any annex is greater than or equal to std::nullopt.
 
template<typename T, typename Alloc>
bool operator>= (std::nullopt_t, annex< T, Alloc > const &rhs) noexcept
 Tests whether std::nullopt is greater than or equal to an annex.
 
template<typename T, typename Alloc>
std::strong_ordering operator<=> (annex< T, Alloc > const &lhs, std::nullopt_t) noexcept
 Three-way compares an annex with std::nullopt.
 
template<typename T, typename Alloc>
std::strong_ordering operator<=> (std::nullopt_t, annex< T, Alloc > const &rhs) noexcept
 Three-way compares std::nullopt with an annex.
 
Annex-to-value comparisons

Empty annex values compare less than any raw value. Engaged annex values compare through their contained values.

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator== (annex< T, Alloc > const &lhs, U const &rhs)
 Compares an annex with a raw value for equality.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator== (U const &lhs, annex< T, Alloc > const &rhs)
 Compares a raw value with an annex for equality.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator!= (annex< T, Alloc > const &lhs, U const &rhs)
 Compares an annex with a raw value for inequality.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator!= (U const &lhs, annex< T, Alloc > const &rhs)
 Compares a raw value with an annex for inequality.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator< (annex< T, Alloc > const &lhs, U const &rhs)
 Orders an annex and a raw value.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator< (U const &lhs, annex< T, Alloc > const &rhs)
 Orders a raw value and an annex.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator<= (annex< T, Alloc > const &lhs, U const &rhs)
 Orders an annex and a raw value.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator<= (U const &lhs, annex< T, Alloc > const &rhs)
 Orders a raw value and an annex.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator> (annex< T, Alloc > const &lhs, U const &rhs)
 Orders an annex and a raw value.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator> (U const &lhs, annex< T, Alloc > const &rhs)
 Orders a raw value and an annex.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator>= (annex< T, Alloc > const &lhs, U const &rhs)
 Orders an annex and a raw value.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool operator>= (U const &lhs, annex< T, Alloc > const &rhs)
 Orders a raw value and an annex.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >) && requires(T const& lhs, U const& rhs) { lhs <=> rhs; }
auto operator<=> (annex< T, Alloc > const &lhs, U const &rhs) -> decltype(*lhs<=> rhs)
 Three-way compares an annex with a raw value when supported.
 
template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >) && requires(U const& lhs, T const& rhs) { lhs <=> rhs; }
auto operator<=> (U const &lhs, annex< T, Alloc > const &rhs) -> decltype(lhs<=> *rhs)
 Three-way compares a raw value with an annex when supported.
 

Variables

template<typename F, typename R, typename V, call_type C>
constexpr auto variant_invoke_table2 = variant_invoke_table_gen2< F, R, V, C >()
 Shared compile-time visitor dispatch table.
 

Detailed Description

Containers, iterator adapters, callable wrappers, and value utilities.

Typedef Documentation

◆ variant

template<typename... Ts>
using rpnx::variant = basic_variant< std::allocator< void >, Ts... >

Convenience alias for a variant using std::allocator<void>.

Template Parameters
TsAlternative types.

◆ variant_invoke_executor

template<typename V, typename F, typename R>
using rpnx::variant_invoke_executor = R (*)(V&&, F&&)

Function-pointer type for one erased visitor dispatch entry.

Template Parameters
VVariant argument type.
FVisitor type.
RResult type.

◆ variant_nth_member_t

template<typename V, std::size_t N>
using rpnx::variant_nth_member_t = typename variant_nth_member< V, N >::type

Alternative type at an index.

Template Parameters
VVariant type.
NZero-based alternative index.

Enumeration Type Documentation

◆ call_type

enum class rpnx::call_type
strong

Policy used when a visitor cannot accept an active alternative.

Enumerator
required 

Require every alternative to be invocable at compile time.

optional 

Skip alternatives for which the visitor is not invocable.

except_on_missing 

Throw when the active alternative is not invocable.

◆ dispatch_type

enum class rpnx::dispatch_type
strong

Strategy used to dispatch a visitor to an active alternative.

Enumerator
automatic 

Select a dispatch strategy from the variant shape.

branching 

Use a compile-time binary branch tree.

indirect 

Use a table of erased function pointers.

Function Documentation

◆ apply_nth_visitor()

template<typename V, typename F, typename R, std::size_t N, call_type C>
R rpnx::apply_nth_visitor ( V && variant,
F && func )
inline

Invokes a visitor for one compile-time alternative index.

Template Parameters
VVariant argument type.
FVisitor type.
RResult type.
NAlternative index.
CMissing-call policy.
Parameters
variantVariant to visit.
funcVisitor to invoke.
Returns
Visitor result when R is non-void.

◆ apply_nth_visitor_branched()

template<std::size_t NBegin, std::size_t NEnd, typename V, typename F, typename R, call_type C>
R rpnx::apply_nth_visitor_branched ( std::size_t index,
V && variant,
F && func )
inline

Dispatches an alternative index through a compile-time binary branch tree.

Template Parameters
NBeginFirst candidate index.
NEndOne-past-last candidate index.
VVariant argument type.
FVisitor type.
RResult type.
CMissing-call policy.
Parameters
indexActive alternative index.
variantVariant to visit.
funcVisitor to invoke.
Returns
Visitor result when R is non-void.

◆ apply_visitor()

template<typename R, dispatch_type D = dispatch_type::automatic, typename V, typename F>
R rpnx::apply_visitor ( V && variant,
F && func )
inline

Invokes a visitor for the active alternative.

Template Parameters
RResult type.
DRuntime dispatch strategy.
VVariant argument type.
FVisitor type; it must accept every alternative.
Parameters
variantVariant to visit.
funcVisitor to invoke.
Returns
Visitor result when R is non-void.

◆ apply_visitor_checked()

template<typename R, typename V, typename F>
R rpnx::apply_visitor_checked ( V && variant,
F && func )
inline

Invokes a visitor and throws when it does not accept the active alternative.

Template Parameters
RResult type.
VVariant argument type.
FVisitor type.
Parameters
variantVariant to visit.
funcVisitor to invoke.
Returns
Visitor result when R is non-void.
Exceptions
std::bad_variant_accessif the visitor cannot accept the active alternative.

◆ get_as() [1/2]

template<typename T, typename... Ts>
auto & rpnx::get_as ( variant< Ts... > & v)
inlineconstexpr

Retrieves a mutable alternative by type.

Template Parameters
TRequested alternative.
TsVariant alternatives.
Parameters
vVariant to inspect.
Returns
Mutable reference to the active T.
Exceptions
std::bad_variant_accessif T is not active.

◆ get_as() [2/2]

template<typename T, typename... Ts>
auto const & rpnx::get_as ( variant< Ts... > const & v)
inlineconstexpr

Retrieves an immutable alternative by type.

Template Parameters
TRequested alternative.
TsVariant alternatives.
Parameters
vVariant to inspect.
Returns
Immutable reference to the active T.
Exceptions
std::bad_variant_accessif T is not active.

◆ make_annex() [1/3]

template<typename T, typename... Args>
annex< T > rpnx::make_annex ( Args &&... args)

Constructs an annex containing a T constructed in place.

Template Parameters
TContained value type.
ArgsConstructor argument types for T.
Parameters
argsArguments forwarded to T.
Returns
Engaged annex containing the constructed value.

◆ make_annex() [2/3]

template<typename T, typename U, typename... Args>
annex< T > rpnx::make_annex ( std::initializer_list< U > init,
Args &&... args )

Constructs an annex containing a T from an initializer list.

Template Parameters
TContained value type.
UInitializer-list element type.
ArgsAdditional constructor argument types for T.
Parameters
initInitializer list forwarded to T.
argsAdditional arguments forwarded to T.
Returns
Engaged annex containing the constructed value.

◆ make_annex() [3/3]

template<typename T>
annex< std::decay_t< T > > rpnx::make_annex ( T && value)

Constructs an annex containing a decayed copy of a value.

Template Parameters
TSource value type.
Parameters
valueValue used to construct the annex.
Returns
Engaged annex containing the forwarded value.

◆ make_bounded_iterator() [1/2]

template<class It>
bidirectional_bounded_iterator< It > rpnx::make_bounded_iterator ( It it,
It first,
It last )
constexprnoexcept

Creates a two-sided bounded random-access iterator.

Template Parameters
ItUnderlying iterator type.
Parameters
itCurrent position.
firstFirst position.
lastOne-past-last position.
Returns
Bounded adapter.

◆ make_bounded_iterator() [2/2]

template<class It>
bounded_iterator< It > rpnx::make_bounded_iterator ( It it,
It last )
constexprnoexcept

Creates an upper-bounded forward iterator.

Template Parameters
ItUnderlying iterator type.
Parameters
itCurrent position.
lastOne-past-last position.
Returns
Bounded adapter.

◆ operator!=() [1/8]

template<typename T, typename Alloc>
bool rpnx::operator!= ( annex< T, Alloc > const & lhs,
annex< T, Alloc > const & rhs )

Compares two annex objects for inequality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
Negation of equality.

◆ operator!=() [2/8]

template<typename T, typename Alloc>
bool rpnx::operator!= ( annex< T, Alloc > const & lhs,
std::nullopt_t  )
noexcept

Tests whether an annex contains a value.

Parameters
lhsAnnex to test.
Returns
true when lhs is engaged.

◆ operator!=() [3/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator!= ( annex< T, Alloc > const & lhs,
U const & rhs )

Compares an annex with a raw value for inequality.

Parameters
lhsAnnex operand.
rhsRaw-value operand.
Returns
Negation of equality.

◆ operator!=() [4/8]

template<typename T, typename Allocator>
bool rpnx::operator!= ( dynar< T, Allocator > const & lhs,
dynar< T, Allocator > const & rhs )

Compares two dynars for inequality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when the contents differ.

◆ operator!=() [5/8]

template<typename Key, typename T, typename Compare, typename Allocator>
bool rpnx::operator!= ( map< Key, T, Compare, Allocator > const & lhs,
map< Key, T, Compare, Allocator > const & rhs )

Compares two maps for inequality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when the contents differ.

◆ operator!=() [6/8]

template<typename Key, typename Compare, typename Allocator>
bool rpnx::operator!= ( set< Key, Compare, Allocator > const & lhs,
set< Key, Compare, Allocator > const & rhs )

Compares two sets for inequality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when the contents differ.

◆ operator!=() [7/8]

template<typename T, typename Alloc>
bool rpnx::operator!= ( std::nullopt_t ,
annex< T, Alloc > const & rhs )
noexcept

Tests whether an annex contains a value.

Parameters
rhsAnnex to test.
Returns
true when rhs is engaged.

◆ operator!=() [8/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator!= ( U const & lhs,
annex< T, Alloc > const & rhs )

Compares a raw value with an annex for inequality.

Parameters
lhsRaw-value operand.
rhsAnnex operand.
Returns
Negation of equality.

◆ operator<() [1/8]

template<typename T, typename Alloc>
bool rpnx::operator< ( annex< T, Alloc > const & ,
std::nullopt_t  )
noexcept

Returns false because an annex is never less than std::nullopt.

Returns
Always false.

◆ operator<() [2/8]

template<typename T, typename Alloc>
bool rpnx::operator< ( annex< T, Alloc > const & lhs,
annex< T, Alloc > const & rhs )

Orders two annex objects.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders before rhs.

◆ operator<() [3/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator< ( annex< T, Alloc > const & lhs,
U const & rhs )

Orders an annex and a raw value.

Parameters
lhsAnnex operand.
rhsRaw-value operand.
Returns
true when lhs orders before rhs.

◆ operator<() [4/8]

template<typename T, typename Allocator>
bool rpnx::operator< ( dynar< T, Allocator > const & lhs,
dynar< T, Allocator > const & rhs )

Orders two dynars by size first, then by the underlying vector ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders before rhs.

◆ operator<() [5/8]

template<typename Key, typename T, typename Compare, typename Allocator>
bool rpnx::operator< ( map< Key, T, Compare, Allocator > const & lhs,
map< Key, T, Compare, Allocator > const & rhs )

Orders two maps by size first, then by the underlying map ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders before rhs.

◆ operator<() [6/8]

template<typename Key, typename Compare, typename Allocator>
bool rpnx::operator< ( set< Key, Compare, Allocator > const & lhs,
set< Key, Compare, Allocator > const & rhs )

Orders two sets by size first, then lexicographically.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders before rhs.

◆ operator<() [7/8]

template<typename T, typename Alloc>
bool rpnx::operator< ( std::nullopt_t ,
annex< T, Alloc > const & rhs )
noexcept

Tests whether std::nullopt is less than an annex.

Parameters
rhsAnnex to test.
Returns
true when rhs is engaged.

◆ operator<() [8/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator< ( U const & lhs,
annex< T, Alloc > const & rhs )

Orders a raw value and an annex.

Parameters
lhsRaw-value operand.
rhsAnnex operand.
Returns
true when lhs orders before rhs.

◆ operator<=() [1/8]

template<typename T, typename Alloc>
bool rpnx::operator<= ( annex< T, Alloc > const & lhs,
annex< T, Alloc > const & rhs )

Orders two annex objects.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order after rhs.

◆ operator<=() [2/8]

template<typename T, typename Alloc>
bool rpnx::operator<= ( annex< T, Alloc > const & lhs,
std::nullopt_t  )
noexcept

Tests whether an annex is less than or equal to std::nullopt.

Parameters
lhsAnnex to test.
Returns
true when lhs is empty.

◆ operator<=() [3/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator<= ( annex< T, Alloc > const & lhs,
U const & rhs )

Orders an annex and a raw value.

Parameters
lhsAnnex operand.
rhsRaw-value operand.
Returns
true when lhs does not order after rhs.

◆ operator<=() [4/8]

template<typename T, typename Allocator>
bool rpnx::operator<= ( dynar< T, Allocator > const & lhs,
dynar< T, Allocator > const & rhs )

Orders two dynars by size first, then by the underlying vector ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order after rhs.

◆ operator<=() [5/8]

template<typename Key, typename T, typename Compare, typename Allocator>
bool rpnx::operator<= ( map< Key, T, Compare, Allocator > const & lhs,
map< Key, T, Compare, Allocator > const & rhs )

Orders two maps by size first, then by the underlying map ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order after rhs.

◆ operator<=() [6/8]

template<typename Key, typename Compare, typename Allocator>
bool rpnx::operator<= ( set< Key, Compare, Allocator > const & lhs,
set< Key, Compare, Allocator > const & rhs )

Orders two sets by size first, then lexicographically.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order after rhs.

◆ operator<=() [7/8]

template<typename T, typename Alloc>
bool rpnx::operator<= ( std::nullopt_t ,
annex< T, Alloc > const &  )
noexcept

Returns true because std::nullopt is less than or equal to any annex.

Returns
Always true.

◆ operator<=() [8/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator<= ( U const & lhs,
annex< T, Alloc > const & rhs )

Orders a raw value and an annex.

Parameters
lhsRaw-value operand.
rhsAnnex operand.
Returns
true when lhs does not order after rhs.

◆ operator<=>() [1/8]

template<typename T, typename Alloc>
requires requires(T const& lhs, T const& rhs) { lhs <=> rhs; }
auto rpnx::operator<=> ( annex< T, Alloc > const & lhs,
annex< T, Alloc > const & rhs ) -> decltype(*lhs <=> *rhs)

Three-way compares two annex objects when T supports <=>.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
Contained-value ordering, with empty ordered before engaged.

◆ operator<=>() [2/8]

template<typename T, typename Alloc>
std::strong_ordering rpnx::operator<=> ( annex< T, Alloc > const & lhs,
std::nullopt_t  )
noexcept

Three-way compares an annex with std::nullopt.

Parameters
lhsAnnex to compare.
Returns
Equal when empty, greater when engaged.

◆ operator<=>() [3/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >) && requires(T const& lhs, U const& rhs) { lhs <=> rhs; }
auto rpnx::operator<=> ( annex< T, Alloc > const & lhs,
U const & rhs ) -> decltype(*lhs <=> rhs)

Three-way compares an annex with a raw value when supported.

Parameters
lhsAnnex operand.
rhsRaw-value operand.
Returns
Contained-value ordering, or less when lhs is empty.

◆ operator<=>() [4/8]

template<typename T, typename Allocator>
auto rpnx::operator<=> ( dynar< T, Allocator > const & lhs,
dynar< T, Allocator > const & rhs ) -> decltype(std::declval< typename dynar< T, Allocator >::underlying_type const& >() <=> std::declval< typename dynar< T, Allocator >::underlying_type const& >())

Three-way compares two dynars by size first, then by the underlying vector ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
Ordering category result.

◆ operator<=>() [5/8]

template<typename Key, typename T, typename Compare, typename Allocator>
auto rpnx::operator<=> ( map< Key, T, Compare, Allocator > const & lhs,
map< Key, T, Compare, Allocator > const & rhs ) -> decltype(std::declval< typename map< Key, T, Compare, Allocator >::underlying_type const& >() <=> std::declval< typename map< Key, T, Compare, Allocator >::underlying_type const& >())

Three-way compares two maps by size first, then by the underlying map ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
Ordering category result.

◆ operator<=>() [6/8]

template<typename Key, typename Compare, typename Allocator>
auto rpnx::operator<=> ( set< Key, Compare, Allocator > const & lhs,
set< Key, Compare, Allocator > const & rhs ) -> decltype(std::declval< typename set< Key, Compare, Allocator >::underlying_type const& >() <=> std::declval< typename set< Key, Compare, Allocator >::underlying_type const& >())

Three-way compares two sets by size first, then lexicographically.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
Ordering category result.

◆ operator<=>() [7/8]

template<typename T, typename Alloc>
std::strong_ordering rpnx::operator<=> ( std::nullopt_t ,
annex< T, Alloc > const & rhs )
noexcept

Three-way compares std::nullopt with an annex.

Parameters
rhsAnnex to compare.
Returns
Equal when empty, less when engaged.

◆ operator<=>() [8/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >) && requires(U const& lhs, T const& rhs) { lhs <=> rhs; }
auto rpnx::operator<=> ( U const & lhs,
annex< T, Alloc > const & rhs ) -> decltype(lhs <=> *rhs)

Three-way compares a raw value with an annex when supported.

Parameters
lhsRaw-value operand.
rhsAnnex operand.
Returns
Contained-value ordering, or greater when rhs is empty.

◆ operator==() [1/8]

template<typename T, typename Alloc>
bool rpnx::operator== ( annex< T, Alloc > const & lhs,
annex< T, Alloc > const & rhs )

Compares two annex objects for equality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when both are empty or contain equal values.

◆ operator==() [2/8]

template<typename T, typename Alloc>
bool rpnx::operator== ( annex< T, Alloc > const & lhs,
std::nullopt_t  )
noexcept

Tests whether an annex is empty.

Parameters
lhsAnnex to test.
Returns
true when lhs is empty.

◆ operator==() [3/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator== ( annex< T, Alloc > const & lhs,
U const & rhs )

Compares an annex with a raw value for equality.

Parameters
lhsAnnex operand.
rhsRaw-value operand.
Returns
true when engaged and equal.

◆ operator==() [4/8]

template<typename T, typename Allocator>
bool rpnx::operator== ( dynar< T, Allocator > const & lhs,
dynar< T, Allocator > const & rhs )

Compares two dynars for equality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when the contents are equal.

◆ operator==() [5/8]

template<typename Key, typename T, typename Compare, typename Allocator>
bool rpnx::operator== ( map< Key, T, Compare, Allocator > const & lhs,
map< Key, T, Compare, Allocator > const & rhs )

Compares two maps for equality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when the contents are equal.

◆ operator==() [6/8]

template<typename Key, typename Compare, typename Allocator>
bool rpnx::operator== ( set< Key, Compare, Allocator > const & lhs,
set< Key, Compare, Allocator > const & rhs )

Compares two sets for equality.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when the contents are equal.

◆ operator==() [7/8]

template<typename T, typename Alloc>
bool rpnx::operator== ( std::nullopt_t ,
annex< T, Alloc > const & rhs )
noexcept

Tests whether an annex is empty.

Parameters
rhsAnnex to test.
Returns
true when rhs is empty.

◆ operator==() [8/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator== ( U const & lhs,
annex< T, Alloc > const & rhs )

Compares a raw value with an annex for equality.

Parameters
lhsRaw-value operand.
rhsAnnex operand.
Returns
true when engaged and equal.

◆ operator>() [1/8]

template<typename T, typename Alloc>
bool rpnx::operator> ( annex< T, Alloc > const & lhs,
annex< T, Alloc > const & rhs )

Orders two annex objects.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders after rhs.

◆ operator>() [2/8]

template<typename T, typename Alloc>
bool rpnx::operator> ( annex< T, Alloc > const & lhs,
std::nullopt_t  )
noexcept

Tests whether an annex is greater than std::nullopt.

Parameters
lhsAnnex to test.
Returns
true when lhs is engaged.

◆ operator>() [3/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator> ( annex< T, Alloc > const & lhs,
U const & rhs )

Orders an annex and a raw value.

Parameters
lhsAnnex operand.
rhsRaw-value operand.
Returns
true when lhs orders after rhs.

◆ operator>() [4/8]

template<typename T, typename Allocator>
bool rpnx::operator> ( dynar< T, Allocator > const & lhs,
dynar< T, Allocator > const & rhs )

Orders two dynars by size first, then by the underlying vector ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders after rhs.

◆ operator>() [5/8]

template<typename Key, typename T, typename Compare, typename Allocator>
bool rpnx::operator> ( map< Key, T, Compare, Allocator > const & lhs,
map< Key, T, Compare, Allocator > const & rhs )

Orders two maps by size first, then by the underlying map ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders after rhs.

◆ operator>() [6/8]

template<typename Key, typename Compare, typename Allocator>
bool rpnx::operator> ( set< Key, Compare, Allocator > const & lhs,
set< Key, Compare, Allocator > const & rhs )

Orders two sets by size first, then lexicographically.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs orders after rhs.

◆ operator>() [7/8]

template<typename T, typename Alloc>
bool rpnx::operator> ( std::nullopt_t ,
annex< T, Alloc > const &  )
noexcept

Returns false because std::nullopt is never greater than an annex.

Returns
Always false.

◆ operator>() [8/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator> ( U const & lhs,
annex< T, Alloc > const & rhs )

Orders a raw value and an annex.

Parameters
lhsRaw-value operand.
rhsAnnex operand.
Returns
true when lhs orders after rhs.

◆ operator>=() [1/8]

template<typename T, typename Alloc>
bool rpnx::operator>= ( annex< T, Alloc > const & ,
std::nullopt_t  )
noexcept

Returns true because any annex is greater than or equal to std::nullopt.

Returns
Always true.

◆ operator>=() [2/8]

template<typename T, typename Alloc>
bool rpnx::operator>= ( annex< T, Alloc > const & lhs,
annex< T, Alloc > const & rhs )

Orders two annex objects.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order before rhs.

◆ operator>=() [3/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator>= ( annex< T, Alloc > const & lhs,
U const & rhs )

Orders an annex and a raw value.

Parameters
lhsAnnex operand.
rhsRaw-value operand.
Returns
true when lhs does not order before rhs.

◆ operator>=() [4/8]

template<typename T, typename Allocator>
bool rpnx::operator>= ( dynar< T, Allocator > const & lhs,
dynar< T, Allocator > const & rhs )

Orders two dynars by size first, then by the underlying vector ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order before rhs.

◆ operator>=() [5/8]

template<typename Key, typename T, typename Compare, typename Allocator>
bool rpnx::operator>= ( map< Key, T, Compare, Allocator > const & lhs,
map< Key, T, Compare, Allocator > const & rhs )

Orders two maps by size first, then by the underlying map ordering.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order before rhs.

◆ operator>=() [6/8]

template<typename Key, typename Compare, typename Allocator>
bool rpnx::operator>= ( set< Key, Compare, Allocator > const & lhs,
set< Key, Compare, Allocator > const & rhs )

Orders two sets by size first, then lexicographically.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
true when lhs does not order before rhs.

◆ operator>=() [7/8]

template<typename T, typename Alloc>
bool rpnx::operator>= ( std::nullopt_t ,
annex< T, Alloc > const & rhs )
noexcept

Tests whether std::nullopt is greater than or equal to an annex.

Parameters
rhsAnnex to test.
Returns
true when rhs is empty.

◆ operator>=() [8/8]

template<typename T, typename Alloc, typename U>
requires (!requires { typename U::value_type; typename U::allocator_type; } || !std::is_same_v< U, annex< typename U::value_type, typename U::allocator_type > >)
bool rpnx::operator>= ( U const & lhs,
annex< T, Alloc > const & rhs )

Orders a raw value and an annex.

Parameters
lhsRaw-value operand.
rhsAnnex operand.
Returns
true when lhs does not order before rhs.

◆ poison_region()

void rpnx::poison_region ( void * ptr,
std::size_t size )
inline

Marks a memory region as poisoned when instrumentation is enabled.

The default implementation is a no-op. Instrumented builds may replace or augment it to make invalid memory access easier to diagnose.

Parameters
ptrStart of the memory region; may be null when size is zero.
sizeRegion size in bytes.

◆ swap() [1/4]

template<typename T, typename Alloc>
void rpnx::swap ( annex< T, Alloc > & lhs,
annex< T, Alloc > & rhs )
noexcept

Swaps two annex objects.

Parameters
lhsFirst annex.
rhsSecond annex.

◆ swap() [2/4]

template<typename T, typename Allocator>
void rpnx::swap ( dynar< T, Allocator > & lhs,
dynar< T, Allocator > & rhs )
noexcept

Swaps two dynars.

Parameters
lhsFirst container.
rhsSecond container.

◆ swap() [3/4]

template<typename Key, typename T, typename Compare, typename Allocator>
void rpnx::swap ( map< Key, T, Compare, Allocator > & lhs,
map< Key, T, Compare, Allocator > & rhs )
noexcept

Swaps two maps.

Parameters
lhsFirst map.
rhsSecond map.

◆ swap() [4/4]

template<typename Key, typename Compare, typename Allocator>
void rpnx::swap ( set< Key, Compare, Allocator > & lhs,
set< Key, Compare, Allocator > & rhs )
noexcept

Swaps two sets.

Parameters
lhsFirst set.
rhsSecond set.

◆ try_apply_visitor()

template<typename R, typename V, typename F>
R rpnx::try_apply_visitor ( V && variant,
F && func )
inline

Invokes a visitor only when it accepts the active alternative.

Template Parameters
RResult type.
VVariant argument type.
FVisitor type.
Parameters
variantVariant to visit.
funcVisitor to invoke.
Returns
Visitor result, or a default-constructed R when not invocable.

◆ update_variant_invoke_table2()

template<std::size_t N, typename F, typename R, typename V, call_type C>
void rpnx::update_variant_invoke_table2 ( std::array< variant_invoke_executor< V, F, R >, variant_size_v< std::remove_cvref_t< V > > > & table)
constexpr

Populates visitor dispatch-table entries recursively.

Template Parameters
NEntry index.
FVisitor type.
RResult type.
VVariant argument type.
CMissing-call policy.
Parameters
tableTable to populate.

◆ variant_invoke_table_gen()

template<typename F, typename R, typename A, typename... Vs>
auto consteval rpnx::variant_invoke_table_gen ( )
consteval

Generates the legacy lvalue visitor dispatch table.

Template Parameters
FVisitor type.
RResult type.
AAllocator type.
VsAlternative types.
Returns
Compile-time dispatch table.

◆ variant_invoke_table_gen2()

template<typename F, typename R, typename V, call_type C>
auto constexpr rpnx::variant_invoke_table_gen2 ( )
constexpr

Generates a visitor dispatch table.

Template Parameters
FVisitor type.
RResult type.
VVariant argument type.
CMissing-call policy.
Returns
Compile-time dispatch table.

Variable Documentation

◆ variant_invoke_table2

template<typename F, typename R, typename V, call_type C>
auto rpnx::variant_invoke_table2 = variant_invoke_table_gen2< F, R, V, C >()
inlineconstexpr

Shared compile-time visitor dispatch table.

Template Parameters
FVisitor type.
RResult type.
VVariant argument type.
CMissing-call policy.