17#ifndef MICRO_TEST_PLUS_TYPE_TRAITS_H_
18#define MICRO_TEST_PLUS_TYPE_TRAITS_H_
31#pragma GCC diagnostic push
33#pragma clang diagnostic ignored "-Wc++98-compat"
34#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
59 template <
class T,
class...>
65#if defined(__DOXYGEN__)
81 template <
class R,
class...
Args_T>
91 template <
class R,
class...
Args_T>
101 template <
class R,
class T,
class...
Args_T>
111 template <
class R,
class T,
class...
Args_T>
121 template <
class...
Ts,
class Expr_T>
137 [] (
auto t) ->
decltype (
t.begin (),
t.end (),
void ()) {});
149 =
is_valid<T> ([] (
auto t) ->
decltype (
void (
t.epsilon)) {});
160#if defined(__clang__) or defined(_MSC_VER)
161 template <
class From,
class To>
164 template <
class From,
class To>
176 template <
class From,
class To>
244 template <
class T, auto N, auto D, auto Size, auto P = 1>
306 template <
class T,
class =
int>
339 type_traits::
requires_t<type_traits::is_floating_point_v<T>>>
343 static inline auto epsilon =
T{};
379#pragma GCC diagnostic pop
constexpr auto pow(const T base, const Exp_T exp) -> T
Generic 'power of', to raise base to exponent (base ^ exp).
static constexpr auto has_npos_v
constexpr auto is_floating_point_v< double >
typename requires_< Cond >::type requires_t
static constexpr auto has_epsilon_v
constexpr auto is_convertible_v
static constexpr auto has_value_v
constexpr auto is_floating_point_v< long double >
static constexpr auto is_container_v
constexpr auto is_valid(Expr_T expr) -> decltype(expr(declval< Ts... >()), bool())
constexpr auto is_floating_point_v
constexpr auto is_convertible(int) -> decltype(bool(To(declval< From >())))
constexpr auto is_floating_point_v< float >
A generic floating point constant, with custom size and precision. It has a getter and a '-' operator...
constexpr auto get() const
static constexpr auto epsilon
static constexpr auto value
constexpr auto operator-() const
constexpr decltype(auto) get() const
constexpr genuine_integral_value(const T &_value)
A generic integral constant. It has a getter and a '-' operator to return the negative value.
constexpr auto get() const
Empty base class of all operators.
constexpr value(const T &val)
constexpr value(const T &_value, const T precision)
Class defining a generic value, accessible via a getter.
constexpr decltype(auto) get() const
constexpr value(const T &_value)