TemplateMetaProgramming.h File Reference
#include <type_traits>
#include <tuple>
#include <cstddef>
+ Include dependency graph for TemplateMetaProgramming.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AddToIndexSequence< Lo, class >
 
struct  AddToIndexSequence< Lo, IndexSequence< Is... > >
 
struct  ConcatIndexSequences< S1, S2 >
 
struct  ConcatIndexSequences< IndexSequence< I1... >, IndexSequence< I2... > >
 
struct  DecayAll< T >
 
struct  DecayAll< T * >
 
struct  DecayAll< T[N]>
 
struct  MakeIndexRange< Lo, Hi >
 
struct  MakeIndexSequence< N >
 
struct  MakeIndexSequence< N >
 
struct  MakeIndexSequence< 0 >
 
struct  MakeIndexSequence< 1 >
 
struct  HasAtMethod< T, IdxT, class >
 Can be used to determine if T has an at method accepting a type of IdxT. More...
 
struct  HasAtMethod< T, IdxT, typename std::enable_if< std::is_same< decltype(std::declval< T >().at(std::declval< IdxT >()), int {}), int >::value >::type >
 Can be used to determine if T has an at method accepting a type of IdxT. More...
 
struct  HasToString< T, class >
 Can be used to determine if there is an overload for std::to_string for a type T. More...
 
struct  HasToString< T, typename std::enable_if< std::is_same< decltype(std::to_string(std::declval< T >()), int {}), int >::value >::type >
 Can be used to determine if there is an overload for std::to_string for a type T. More...
 
struct  IndexSequence<... >
 
struct  is_in_types< T, Ts >
 
struct  is_in_types< T, T0, Ts... >
 
class  is_streamable< S, T >
 
struct  IsBaseOf< Base, Ds >
 
struct  IsBaseOf< Base, D0, Ds... >
 
struct  NthType< n, Ts >
 
struct  NthType< n, T0, Ts... >
 
struct  RemoveRvalueReference< T >
 Removes rvalue ref from a type. More...
 
struct  RemoveRvalueReference< T && >
 
struct  TypeTemplateTraits
 Traits about templates taking only types as parameters. More...
 
struct  TypeTemplateTraits::DisassembleTemplate< T >
 
struct  TypeTemplateTraits::DisassembleTemplate< Template< Params... > >
 
struct  TypeTemplateTraits::IsInstanceOf< Template, T >
 Whether a type T is the instance of a given template Template. More...
 
struct  TypeTemplateTraits::IsInstanceOf< Template, Template< Params... > >
 Whether a type T is the instance of a given template Template. More...
 
struct  Wrapper< T >
 

Namespaces

 armarx
 This file offers overloads of toIce() and fromIce() functions for STL container types.
 
 armarx::meta
 
 armarx::meta::detail
 

Macros

#define ARMARX_META_MAKE_HAS_MEMBER_FNC_CHECK(CHECKNAME, FNCNAME, FNCSIG)
 

Typedefs

template<class T >
using DecayAll = detail::DecayAll< typename std::decay< T >::type >
 Similar to std::decay but also decays ptr and array. More...
 
template<class T0 , class... Ts>
using first_type = T0
 Get the type of the first element of a template parameter pack. More...
 
template<class T0 , class... Ts>
using last_type = typename std::decay< typename std::tuple_element< sizeof...(Ts), std::tuple< T0, Ts... > >::type >::type
 Get the type of the last element of a template parameter pack. More...
 
template<std::size_t Lo, std::size_t Hi>
using MakeIndexRange = typename detail::MakeIndexRange< Lo, Hi >::type
 
template<std::size_t N>
using MakeIndexSequence = typename detail::MakeIndexSequence< N >::type
 
template<class... Ts>
using MakeIndexSequenceFor = MakeIndexSequence< sizeof...(Ts)>
 
template<std::size_t n, class T0 , class... Ts>
using nth_type = typename std::decay< typename std::tuple_element< n, std::tuple< T0, Ts... > >::type >::type
 Get the type of the nth element of a template parameter pack. More...
 
template<class T >
using RemoveRvalueReferenceT = typename RemoveRvalueReference< T >::type
 
template<class T0 , class T1 , class... Ts>
using second_type = T1
 Get the type of the second element of a template parameter pack. More...
 
template<class T0 , class T1 , class T2 , class... Ts>
using third_type = T2
 Get the type of the third element of a template parameter pack. More...
 
template<class... >
using void_t = void
 Helper for sfinae (is added in c++17) More...
 

Macro Definition Documentation

◆ ARMARX_META_MAKE_HAS_MEMBER_FNC_CHECK

#define ARMARX_META_MAKE_HAS_MEMBER_FNC_CHECK (   CHECKNAME,
  FNCNAME,
  FNCSIG 
)
Value:
template <class T> \
class CHECKNAME \
{ \
struct one {}; \
struct two { one a, b; }; \
template<class C, C> struct classAndFncPtr; \
template<class C> \
static one has(classAndFncPtr<FNCSIG, &C::FNCNAME>*); \
template<class T2> \
static two has(...); \
public: \
static constexpr bool value = sizeof(has<T>(0)) == sizeof(one); \
}; \
template <class T> \
static constexpr bool CHECKNAME##_v = CHECKNAME<T>::value

Definition at line 176 of file TemplateMetaProgramming.h.

armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926