COMMS
Template library intended to help with implementation of communication protocols.
|
Contains various tuple type manipulation classes and functions. More...
#include <tuple>
#include <utility>
#include <type_traits>
#include "comms/CompileControl.h"
#include "comms/util/type_traits.h"
#include "comms/util/AlignedStorage.h"
#include "comms/Assert.h"
Go to the source code of this file.
Classes | |
struct | comms::util::IsTuple< TType > |
Check whether provided type is a variant of std::tuple. More... | |
struct | comms::util::TupleAsAlignedUnion< TTuple > |
Calculated "aligned union" storage type for all the types in provided tuple. More... | |
struct | comms::util::TupleCat< TFirst, TSecond > |
Provides the type of std::tuple_cat operation. More... | |
Namespaces | |
namespace | comms |
Main namespace for all classes / functions of COMMS library. | |
namespace | comms::util |
Namespace for various utility classes and/or functions used by COMMS library. | |
Typedefs | |
template<typename TTuple > | |
using | comms::util::TupleAsAlignedUnionT = typename TupleAsAlignedUnion< TTuple >::Type |
Alias to TupleAsAlignedUnion::Type. | |
Functions | |
template<typename TType > | |
constexpr bool | comms::util::isTuple () |
Check whether provided type is a variant of std::tuple. | |
template<typename TTuple , typename TValue , typename TFunc > | |
constexpr TValue | comms::util::tupleAccumulate (TTuple &&tuple, const TValue &value, TFunc &&func) |
Performs "accumulate" algorithm on every element of the tuple. | |
template<std::size_t TFrom, std::size_t TUntil, typename TTuple , typename TValue , typename TFunc > | |
constexpr TValue | comms::util::tupleAccumulateFromUntil (TTuple &&tuple, const TValue &value, TFunc &&func) |
Performs "accumulate" algorithm on every element of the tuple. | |
template<typename TTuple , typename TFunc > | |
void | comms::util::tupleForEach (TTuple &&tuple, TFunc &&func) |
Invoke provided functor for every element in the tuple. | |
template<std::size_t TIdx, typename TTuple , typename TFunc > | |
void | comms::util::tupleForEachFrom (TTuple &&tuple, TFunc &&func) |
Invoke provided functor for every element in the tuple starting from element with specified index. | |
template<std::size_t TFromIdx, std::size_t TUntilIdx, typename TTuple , typename TFunc > | |
void | comms::util::tupleForEachFromUntil (TTuple &&tuple, TFunc &&func) |
Invoke provided functor for every element in the tuple which indices are in range [TFromIdx, TUntilIdx). | |
template<typename TTuple , typename TFunc > | |
void | comms::util::tupleForEachType (TFunc &&func) |
Invoke provided functor for every type in the tuple. | |
template<std::size_t TIdx, typename TTuple , typename TFunc > | |
void | comms::util::tupleForEachUntil (TTuple &&tuple, TFunc &&func) |
Invoke provided functor for every element in the tuple until element with specified index is reached. | |
template<typename TTuple , typename TFunc > | |
void | comms::util::tupleForEachWithIdx (TTuple &&tuple, TFunc &&func) |
Invoke provided functor for every element in the tuple while providing information about element index in the tuple. | |
template<typename TTuple , typename TFunc > | |
void | comms::util::tupleForEachWithTemplateParamIdx (TTuple &&tuple, TFunc &&func) |
Invoke provided functor for every element in the tuple while providing information about element index in the tuple as a template parameter. | |
template<typename TTuple , typename TFunc > | |
void | comms::util::tupleForSelectedType (std::size_t idx, TFunc &&func) |
Invoke provided functor for a selected type when element index is known only at run time. | |
template<typename TTail , typename TTuple > | |
constexpr bool | comms::util::tupleIsTailOf () |
Compile time check of whether one tuple is a "tail" of another. | |
template<typename TTuple , typename TValue , typename TFunc > | |
constexpr TValue | comms::util::tupleTypeAccumulate (const TValue &value, TFunc &&func) |
Performs "accumulate" algorithm on every type of the tuple. | |
template<std::size_t TFrom, std::size_t TUntil, typename TTuple , typename TValue , typename TFunc > | |
constexpr TValue | comms::util::tupleTypeAccumulateFromUntil (const TValue &value, TFunc &&func) |
Performs "accumulate" algorithm on specified types inside the tuple. | |
template<typename TTuple , typename TFunc > | |
constexpr bool | comms::util::tupleTypeIsAnyOf (TFunc &&func) |
Compile time check of whether any type within a tuple has a certain condition. | |
Contains various tuple type manipulation classes and functions.