emlabcpp
modern opinionated embedded C++ library
impl.h File Reference
#include "../types.h"
#include <tuple>
+ Include dependency graph for impl.h:

Go to the source code of this file.

Classes

struct  emlabcpp::impl::map_f_collector< T >
 
struct  emlabcpp::impl::map_f_collector< std::array< T, N > >
 

Namespaces

 emlabcpp
 MIT License.
 
 emlabcpp::impl
 MIT License.
 

Macros

#define EMLABCPP_INDEX_MAX   32
 
#define EMLABCPP_INDEX_EXPAND(F)
 
#define EMLABCPP_INDEX_SWITCH_CASE(x)
 
#define EMLABCPP_INDEX_SEQ(x)
 
#define EMLABCPP_INDEX_UNTIL(x)
 

Functions

template<typename... Args, typename UnaryPredicate , std::size_t... Idx>
constexpr std::size_t emlabcpp::impl::find_if_impl (std::tuple< Args... > const &t, UnaryPredicate &&f, std::index_sequence< Idx... >)
 
template<typename T , std::size_t N, range_container Container, typename UnaryCallable , std::size_t... Is>
std::array< T, N > emlabcpp::impl::map_f_to_a_impl (Container &&cont, UnaryCallable &&f, std::integer_sequence< std::size_t, Is... >)
 
template<typename T , std::size_t N, gettable_container Container, typename UnaryCallable , std::size_t... Is>
 emlabcpp::impl::requires (!range_container< Container >) std
 
template<typename T >
requires emlabcpp::impl::requires (T a, typename T::value_type b)
 
template<std::size_t I, typename T >
constexpr auto emlabcpp::impl::get_ith_item_from_arrays (T &arr, auto &... arrays)
 
template<std::size_t Off, std::size_t N, typename F >
constexpr decltype(auto) emlabcpp::impl::index_switch (std::size_t i, F &&f)
 Executes f<i> if provided i matches. More...
 
template<std::size_t Off, std::size_t N, typename F >
constexpr void emlabcpp::impl::index_seq (F &&f)
 Executes f<i> for i going from Off to N. More...
 
template<std::size_t Off, std::size_t N, typename F >
constexpr bool emlabcpp::impl::index_until (F &&f)
 Executes f<i> until some is true. More...
 

Variables

template<typename T >
concept emlabcpp::impl::map_f_collectable
 

Macro Definition Documentation

◆ EMLABCPP_INDEX_EXPAND

#define EMLABCPP_INDEX_EXPAND (   F)

◆ EMLABCPP_INDEX_MAX

#define EMLABCPP_INDEX_MAX   32

◆ EMLABCPP_INDEX_SEQ

#define EMLABCPP_INDEX_SEQ (   x)
Value:
if constexpr ( x < N ) \
f.template operator()< Off + x >();
N
Definition: static_storage.h:97

◆ EMLABCPP_INDEX_SWITCH_CASE

#define EMLABCPP_INDEX_SWITCH_CASE (   x)
Value:
case x: \
if constexpr ( x < N ) \
return std::forward< F >( f ).template operator()< Off + x >();
UnaryCallable && f
Definition: algorithm.h:161

◆ EMLABCPP_INDEX_UNTIL

#define EMLABCPP_INDEX_UNTIL (   x)
Value:
if constexpr ( x < N ) \
if ( f.template operator()< Off + x >() ) \
return true;