Seastar
High performance C++ framework for concurrent servers
|
Classes | |
class | seastar::bool_class< Tag > |
Type-safe boolean. More... | |
class | seastar::reference_wrapper< T > |
struct | seastar::tuple_map_types< MapClass, Tuple > |
Functions | |
template<typename T > | |
reference_wrapper< T > | seastar::ref (T &object) noexcept |
Wraps reference in a reference_wrapper. | |
template<typename T > | |
reference_wrapper< const T > | seastar::cref (const T &object) noexcept |
Wraps constant reference in a reference_wrapper. | |
template<template< typename > class FilterClass, typename... Elements> | |
auto | seastar::tuple_filter_by_type (const std::tuple< Elements... > &t) |
template<template< typename > class FilterClass, typename... Elements> | |
auto | seastar::tuple_filter_by_type (std::tuple< Elements... > &&t) |
template<typename Function , typename... Elements> | |
auto | seastar::tuple_map (const std::tuple< Elements... > &t, Function &&f) |
template<typename Function , typename... Elements> | |
auto | seastar::tuple_map (std::tuple< Elements... > &&t, Function &&f) |
template<typename Function , typename... Elements> | |
void | seastar::tuple_for_each (const std::tuple< Elements... > &t, Function &&f) |
template<typename Function , typename... Elements> | |
void | seastar::tuple_for_each (std::tuple< Elements... > &t, Function &&f) |
template<typename Function , typename... Elements> | |
void | seastar::tuple_for_each (std::tuple< Elements... > &&t, Function &&f) |
template<typename... Args> | |
auto | seastar::make_visitor (Args &&... args) |
template<typename Variant , typename... Args> | |
auto | seastar::visit (Variant &&variant, Args &&... args) |
template<typename... Args> | |
internal::castable_variant< Args... > | seastar::variant_cast (std::variant< Args... > &&var) |
template<typename... Args> | |
internal::castable_variant< Args... > | seastar::variant_cast (const std::variant< Args... > &var) |
Variables | |
static const bool_class | seastar::bool_class< Tag >::yes { true } |
static const bool_class | seastar::bool_class< Tag >::no { false } |
struct seastar::tuple_map_types |
auto seastar::make_visitor | ( | Args &&... | args | ) |
Creates a visitor from function objects.
Returns a visitor object comprised of the provided function objects. Can be used with std::variant or any other custom variant implementation.
args | function objects each accepting one or some types stored in the variant as input |
auto seastar::tuple_filter_by_type | ( | const std::tuple< Elements... > & | t | ) |
Filters elements in tuple by their type
Returns a tuple containing only those elements which type T
caused expression FilterClass<T>::value to be true.
FilterClass | class template having an element value set to true for elements that should be present in the result |
t | tuple to filter |
void seastar::tuple_for_each | ( | const std::tuple< Elements... > & | t, |
Function && | f | ||
) |
Iterate over all elements in tuple
Iterates over given tuple and calls the specified function for each of it elements.
t | a tuple to iterate over |
f | function to call for each tuple element |
auto seastar::tuple_map | ( | const std::tuple< Elements... > & | t, |
Function && | f | ||
) |
Applies function to all elements in tuple
Applies given function to all elements in the tuple and returns a tuple of results.
t | original tuple |
f | function to apply |
|
inline |
Applies a static visitor comprised of supplied lambdas to a variant. Note that the lambdas should cover all the types that the variant can possibly hold.
Returns the common type of return types of all lambdas.
Variant | the type of a variant |
Args | types of lambda objects |
variant | the variant object |
args | lambda objects each accepting one or some types stored in the variant as input |