mc_rtc::internal::args_t< T > Struct Template Reference

#include <mc_rtc/DataStore.h>

Public Types

using decay_t = typename std::decay< T >::type
 
using type = typename std::conditional< is_arithmetic, decay_t, T >::type
 

Static Public Attributes

static constexpr bool is_arithmetic = std::is_arithmetic<decay_t>::value
 

Detailed Description

template<typename T>
struct mc_rtc::internal::args_t< T >

Bend usual C++ rules to deduct the argument types in call

Normally when passing an lvalue to a template function, T && will be T &. In our case, for arithmetic types (typically double) we far more often want T so this traits changes the deduction rule for those types

Member Typedef Documentation

◆ decay_t

template<typename T >
using mc_rtc::internal::args_t< T >::decay_t = typename std::decay<T>::type

◆ type

template<typename T >
using mc_rtc::internal::args_t< T >::type = typename std::conditional<is_arithmetic, decay_t, T>::type

Member Data Documentation

◆ is_arithmetic

template<typename T >
constexpr bool mc_rtc::internal::args_t< T >::is_arithmetic = std::is_arithmetic<decay_t>::value
staticconstexpr

The documentation for this struct was generated from the following file: