micro-test-plus 3.2.0
µTest++, a lightweight testing framework for embedded platforms
Loading...
Searching...
No Matches
type-traits.h File Reference
#include "math.h"

Go to the source code of this file.

Classes

struct  micro_os_plus::micro_test_plus::type_traits::floating_point_constant< T, N, D, Size, P >
 A generic floating point constant, with custom size and precision. It has a getter and a '-' operator to return the negative value. More...
 
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(*)(Args_T...)>
 
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(Args_T...)>
 
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(T::*)(Args_T...) const >
 
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(T::*)(Args_T...)>
 
struct  micro_os_plus::micro_test_plus::type_traits::genuine_integral_value< T >
 
struct  micro_os_plus::micro_test_plus::type_traits::identity< T,... >
 
struct  micro_os_plus::micro_test_plus::type_traits::integral_constant< N >
 A generic integral constant. It has a getter and a '-' operator to return the negative value. More...
 
struct  micro_os_plus::micro_test_plus::type_traits::list<... >
 
struct  micro_os_plus::micro_test_plus::type_traits::op
 Empty base class of all operators. More...
 
struct  micro_os_plus::micro_test_plus::type_traits::requires_< bool >
 
struct  micro_os_plus::micro_test_plus::type_traits::requires_< true >
 
struct  micro_os_plus::micro_test_plus::type_traits::value< T, class >
 Class defining a generic value, accessible via a getter. More...
 
struct  micro_os_plus::micro_test_plus::type_traits::value< T, type_traits::requires_t< type_traits::is_floating_point_v< T > > >
 A generic value used to define floating points, which, in addition to the actual value, has an epsilon, to use the desired precision during comparisons. If missing, the default is 1 / (10^decimals). More...
 

Namespaces

namespace  micro_os_plus
 
namespace  micro_os_plus::micro_test_plus
 
namespace  micro_os_plus::micro_test_plus::type_traits
 Local type traits. Some may have standard equivalents, but better keep them locally.
 

Typedefs

template<bool Cond>
using micro_os_plus::micro_test_plus::type_traits::requires_t = typename requires_<Cond>::type
 

Functions

template<class T >
T && micro_os_plus::micro_test_plus::type_traits::declval ()
 
template<class... >
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_convertible (...)
 
template<class From , class To >
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_convertible (int) -> decltype(bool(To(declval< From >())))
 
template<class... >
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_valid (...) -> bool
 
template<class... Ts, class Expr_T >
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_valid (Expr_T expr) -> decltype(expr(declval< Ts... >()), bool())
 

Variables

template<class T >
static constexpr auto micro_os_plus::micro_test_plus::type_traits::has_epsilon_v = is_valid<T> ([] (auto t) -> decltype (void (t.epsilon)) {})
 
template<class T >
static constexpr auto micro_os_plus::micro_test_plus::type_traits::has_npos_v = is_valid<T> ([] (auto t) -> decltype (void (t.npos)) {})
 
template<class T >
static constexpr auto micro_os_plus::micro_test_plus::type_traits::has_value_v = is_valid<T> ([] (auto t) -> decltype (void (t.value)) {})
 
template<class T >
static constexpr auto micro_os_plus::micro_test_plus::type_traits::is_container_v
 
template<class From , class To >
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_convertible_v = is_convertible<From, To> (0)
 
template<class T >
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_floating_point_v = false
 
template<>
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_floating_point_v< double > = true
 
template<>
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_floating_point_v< float > = true
 
template<>
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_floating_point_v< long double > = true
 
template<class T >
constexpr auto micro_os_plus::micro_test_plus::type_traits::is_op_v = __is_base_of (type_traits::op, T)