17#ifndef MICRO_TEST_PLUS_LITERALS_H_
18#define MICRO_TEST_PLUS_LITERALS_H_
33#pragma GCC diagnostic push
34#pragma GCC diagnostic ignored "-Waggregate-return"
36#pragma clang diagnostic ignored "-Wc++98-compat"
37#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
56 [[nodiscard]]
constexpr auto
67 [[nodiscard]]
constexpr auto
78 [[nodiscard]]
constexpr auto
89 [[nodiscard]]
constexpr auto
100 template <
char... Cs>
101 [[nodiscard]]
constexpr auto
111 template <
char... Cs>
112 [[nodiscard]]
constexpr auto
122 template <
char... Cs>
123 [[nodiscard]]
constexpr auto
133 template <
char... Cs>
134 [[nodiscard]]
constexpr auto
145 template <
char... Cs>
146 [[nodiscard]]
constexpr auto
157 template <
char... Cs>
158 [[nodiscard]]
constexpr auto
169 template <
char... Cs>
170 [[nodiscard]]
constexpr auto
174 math::num<
unsigned long long, Cs...> ()>{};
181 template <
char... Cs>
182 [[nodiscard]]
constexpr auto
193 template <
char... Cs>
194 [[nodiscard]]
constexpr auto
205 template <
char... Cs>
206 [[nodiscard]]
constexpr auto
217 template <
char... Cs>
218 [[nodiscard]]
constexpr auto
229 template <
char... Cs>
230 [[nodiscard]]
constexpr auto
241 template <
char... Cs>
242 [[nodiscard]]
constexpr auto
253 template <
char... Cs>
254 [[nodiscard]]
constexpr auto
265 template <
char... Cs>
266 [[nodiscard]]
constexpr auto
277 template <
char... Cs>
278 [[nodiscard]]
constexpr auto
282 float,
math::num<
unsigned long, Cs...> (),
283 math::den<unsigned long, Cs...> (),
291 template <
char... Cs>
292 [[nodiscard]]
constexpr auto
296 double,
math::num<
unsigned long, Cs...> (),
297 math::den<unsigned long, Cs...> (),
305 template <
char... Cs>
306 [[nodiscard]]
constexpr auto
310 long double,
math::num<
unsigned long long, Cs...> (),
311 math::den<unsigned long long, Cs...> (),
320 operator""_b (
const char* name,
decltype (
sizeof (
"")) size)
324 using value_type = bool;
325 [[nodiscard]]
constexpr
326 operator value_type ()
const
331 [[nodiscard]]
constexpr auto
332 operator== (
const named&)
const
337 [[nodiscard]]
constexpr auto
338 operator== (
const bool other)
const
344 return named{ { name, size }, {} };
351#pragma GCC diagnostic push
352#if defined(__clang__)
353#pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
411 constexpr explicit _t (
const T& t) : type_traits::
value<T>{ t }
417#pragma GCC diagnostic pop
493 constexpr explicit to_t (
const T& t) : type_traits::
value<T>{ t }
502#pragma GCC diagnostic pop
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.
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
Template for wrapping any other type.
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)