Control Surface master
MIDI Control Surface library for Arduino
Classes | Typedefs | Functions
TypeTraits.hpp File Reference
#include <Settings/NamespaceSettings.hpp>
#include <AH/STL/type_traits>
#include <AH/STL/utility>
+ Include dependency graph for TypeTraits.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  has_method_begin< class, class >
 
struct  has_method_begin< T, void_t< decltype(std::declval< T >().begin())> >
 

Typedefs

template<class... >
using void_t = void
 

Functions

template<class T >
std::enable_if< has_method_begin< T >::value >::type begin_if_possible (T &t)
 Calls the begin() method of t if that method exists. More...
 
template<class T >
std::enable_if<!has_method_begin< T >::value >::type begin_if_possible (T &)
 

Typedef Documentation

◆ void_t

using void_t = void

Definition at line 11 of file TypeTraits.hpp.

Function Documentation

◆ begin_if_possible() [1/2]

std::enable_if< has_method_begin< T >::value >::type begin_if_possible ( T &  t)

Calls the begin() method of t if that method exists.

Definition at line 23 of file TypeTraits.hpp.

◆ begin_if_possible() [2/2]

std::enable_if<!has_method_begin< T >::value >::type begin_if_possible ( T &  )

Definition at line 29 of file TypeTraits.hpp.