16#ifndef MICRO_TEST_PLUS_LITERALS_H_
17#define MICRO_TEST_PLUS_LITERALS_H_
32#pragma GCC diagnostic push
33#pragma GCC diagnostic ignored "-Waggregate-return"
35#pragma clang diagnostic ignored "-Wc++98-compat"
36#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
55 [[nodiscard]]
constexpr auto
66 [[nodiscard]]
constexpr auto
77 [[nodiscard]]
constexpr auto
88 [[nodiscard]]
constexpr auto
100 [[nodiscard]]
constexpr auto
110 template <
char... Cs>
111 [[nodiscard]]
constexpr auto
121 template <
char... Cs>
122 [[nodiscard]]
constexpr auto
132 template <
char... Cs>
133 [[nodiscard]]
constexpr auto
144 template <
char... Cs>
145 [[nodiscard]]
constexpr auto
156 template <
char... Cs>
157 [[nodiscard]]
constexpr auto
168 template <
char... Cs>
169 [[nodiscard]]
constexpr auto
173 math::num<
unsigned long long, Cs...> ()>{};
180 template <
char... Cs>
181 [[nodiscard]]
constexpr auto
192 template <
char... Cs>
193 [[nodiscard]]
constexpr auto
204 template <
char... Cs>
205 [[nodiscard]]
constexpr auto
216 template <
char... Cs>
217 [[nodiscard]]
constexpr auto
228 template <
char... Cs>
229 [[nodiscard]]
constexpr auto
240 template <
char... Cs>
241 [[nodiscard]]
constexpr auto
252 template <
char... Cs>
253 [[nodiscard]]
constexpr auto
264 template <
char... Cs>
265 [[nodiscard]]
constexpr auto
276 template <
char... Cs>
277 [[nodiscard]]
constexpr auto
281 float,
math::num<
unsigned long, Cs...> (),
290 template <
char... Cs>
291 [[nodiscard]]
constexpr auto
295 double,
math::num<
unsigned long, Cs...> (),
304 template <
char... Cs>
305 [[nodiscard]]
constexpr auto
309 long double,
math::num<
unsigned long long, Cs...> (),
319 operator""_b (
const char* name,
decltype (
sizeof (
"")) size)
323 using value_type = bool;
324 [[nodiscard]]
constexpr
325 operator value_type ()
const
330 [[nodiscard]]
constexpr auto
331 operator== (
const named&)
const
336 [[nodiscard]]
constexpr auto
337 operator== (
const bool other)
const
343 return named{ { name, size }, {} };
350#pragma GCC diagnostic push
351#if defined(__clang__)
352#pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
416#pragma GCC diagnostic pop
501#pragma GCC diagnostic pop
type_traits::value< short > to_s
type_traits::value< std::int64_t > to_i64
type_traits::value< long double > to_ld
type_traits::value< double > to_d
type_traits::value< std::uint32_t > to_u32
type_traits::value< float > to_f
type_traits::value< unsigned long long > to_ull
type_traits::value< char > to_c
type_traits::value< std::uint64_t > to_u64
type_traits::value< bool > to_b
type_traits::value< std::uint8_t > to_u8
type_traits::value< unsigned char > to_uc
type_traits::value< std::int32_t > to_i32
type_traits::value< unsigned long > to_ul
type_traits::value< std::uint16_t > to_u16
type_traits::value< std::int8_t > to_i8
type_traits::value< long > to_l
type_traits::value< int > to_i
type_traits::value< long long > to_ll
type_traits::value< unsigned > to_u
type_traits::value< unsigned short > to_us
type_traits::value< signed char > to_sc
type_traits::value< std::int16_t > to_i16
User Defined Literals (UDL). Use them to suffix constants and obtain specific explicit types,...
constexpr auto den() -> T
Compute the decimals of a number represented as an array of characters.
constexpr auto num() -> T
Compute the integral value of a number represented as an array of characters.
constexpr auto den_size() -> T
Compute the number of decimal places of a number represented as an array of characters.
Local type traits. Some may have standard equivalents, but better keep them locally.
type_traits::value< std::uint16_t > _u16
type_traits::value< unsigned long long > _ull
type_traits::value< short > _s
type_traits::value< int > _i
type_traits::value< unsigned char > _uc
type_traits::value< std::uint8_t > _u8
type_traits::value< std::int8_t > _i8
type_traits::value< std::int32_t > _i32
type_traits::value< unsigned short > _us
type_traits::value< double > _d
type_traits::value< long long > _ll
type_traits::value< unsigned > _u
type_traits::value< bool > _b
type_traits::value< long double > _ld
type_traits::value< unsigned long > _ul
type_traits::value< long > _l
type_traits::value< char > _c
type_traits::value< std::uint64_t > _u64
type_traits::value< signed char > _sc
type_traits::value< float > _f
type_traits::value< std::int64_t > _i64
type_traits::value< std::int16_t > _i16
type_traits::value< std::uint32_t > _u32
constexpr to_t(const T &t)
Constructor.
A generic floating point constant, with custom size and precision. It has a getter and a '-' operator...
A generic integral constant. It has a getter and a '-' operator to return the negative value.
Empty base class of all operators.
Class defining a generic value, accessible via a getter.
constexpr value(const T &_value)