The literals.h
File Reference
C++ header file with declarations for the µTest++ user-defined literals and type wrappers. More...
Included Headers
Namespaces Index
namespace | micro_os_plus |
The primary namespace for the µOS++ framework. More... | |
namespace | micro_os_plus::micro_test_plus |
Primary namespace for the µTest++ testing framework. More... | |
namespace | micro_os_plus::micro_test_plus::literals |
User-defined literals and type wrappers for the µTest++ testing framework. More... | |
Classes Index
struct | _t<T> |
Deprecated generic strongly-typed wrapper for explicit type conversion. More... | |
struct | to_t<T> |
Generic strongly-typed wrapper for explicit type conversion. More... | |
Deprecated Type Wrappers Index
using | _b = type_traits::value< bool > |
Strongly-typed wrapper for | |
using | _c = type_traits::value< char > |
Strongly-typed wrapper for | |
using | _d = type_traits::value< double > |
Strongly-typed wrapper for | |
using | _f = type_traits::value< float > |
Strongly-typed wrapper for | |
using | _i = type_traits::value< int > |
Strongly-typed wrapper for | |
using | _i16 = type_traits::value< std::int16_t > |
Strongly-typed wrapper for | |
using | _i32 = type_traits::value< std::int32_t > |
Strongly-typed wrapper for | |
using | _i64 = type_traits::value< std::int64_t > |
Strongly-typed wrapper for | |
using | _i8 = type_traits::value< std::int8_t > |
Strongly-typed wrapper for | |
using | _l = type_traits::value< long > |
Strongly-typed wrapper for | |
using | _ld = type_traits::value< long double > |
Strongly-typed wrapper for | |
using | _ll = type_traits::value< long long > |
Strongly-typed wrapper for | |
using | _s = type_traits::value< short > |
Strongly-typed wrapper for | |
using | _sc = type_traits::value< signed char > |
Strongly-typed wrapper for | |
using | _u = type_traits::value< unsigned > |
Strongly-typed wrapper for | |
using | _u16 = type_traits::value< std::uint16_t > |
Strongly-typed wrapper for | |
using | _u32 = type_traits::value< std::uint32_t > |
Strongly-typed wrapper for | |
using | _u64 = type_traits::value< std::uint64_t > |
Strongly-typed wrapper for | |
using | _u8 = type_traits::value< std::uint8_t > |
Strongly-typed wrapper for | |
using | _uc = type_traits::value< unsigned char > |
Strongly-typed wrapper for | |
using | _ul = type_traits::value< unsigned long > |
Strongly-typed wrapper for | |
using | _ull = type_traits::value< unsigned long long > |
Strongly-typed wrapper for | |
using | _us = type_traits::value< unsigned short > |
Strongly-typed wrapper for | |
Type Wrappers Index
using | to_b = type_traits::value< bool > |
Strongly-typed wrapper for | |
using | to_c = type_traits::value< char > |
Strongly-typed wrapper for | |
using | to_d = type_traits::value< double > |
Strongly-typed wrapper for | |
using | to_f = type_traits::value< float > |
Strongly-typed wrapper for | |
using | to_i = type_traits::value< int > |
Strongly-typed wrapper for | |
using | to_i16 = type_traits::value< std::int16_t > |
Strongly-typed wrapper for | |
using | to_i32 = type_traits::value< std::int32_t > |
Strongly-typed wrapper for | |
using | to_i64 = type_traits::value< std::int64_t > |
Strongly-typed wrapper for | |
using | to_i8 = type_traits::value< std::int8_t > |
Strongly-typed wrapper for | |
using | to_l = type_traits::value< long > |
Strongly-typed wrapper for | |
using | to_ld = type_traits::value< long double > |
Strongly-typed wrapper for | |
using | to_ll = type_traits::value< long long > |
Strongly-typed wrapper for | |
using | to_s = type_traits::value< short > |
Strongly-typed wrapper for | |
using | to_sc = type_traits::value< signed char > |
Strongly-typed wrapper for | |
using | to_u = type_traits::value< unsigned > |
Strongly-typed wrapper for | |
using | to_u16 = type_traits::value< std::uint16_t > |
Strongly-typed wrapper for | |
using | to_u32 = type_traits::value< std::uint32_t > |
Strongly-typed wrapper for | |
using | to_u64 = type_traits::value< std::uint64_t > |
Strongly-typed wrapper for | |
using | to_u8 = type_traits::value< std::uint8_t > |
Strongly-typed wrapper for | |
using | to_uc = type_traits::value< unsigned char > |
Strongly-typed wrapper for | |
using | to_ul = type_traits::value< unsigned long > |
Strongly-typed wrapper for | |
using | to_ull = type_traits::value< unsigned long long > |
Strongly-typed wrapper for | |
using | to_us = type_traits::value< unsigned short > |
Strongly-typed wrapper for | |
Functions Index
constexpr auto | operator""_b (const char *name, decltype(sizeof("")) size) |
User-defined literal operator to convert to | |
constexpr auto | operator""_c () |
User-defined literal operator to convert to | |
constexpr auto | operator""_d () |
User-defined literal operator to convert to | |
constexpr auto | operator""_f () |
User-defined literal operator to convert to | |
constexpr auto | operator""_i () |
User-defined literal operator to convert to | |
constexpr auto | operator""_i16 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_i32 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_i64 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_i8 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_l () |
User-defined literal operator to convert to | |
constexpr auto | operator""_ld () |
User-defined literal operator to convert to | |
constexpr auto | operator""_ll () |
User-defined literal operator to convert to | |
constexpr auto | operator""_s () |
User-defined literal operator to convert to | |
constexpr auto | operator""_sc () |
User-defined literal operator to convert to | |
constexpr auto | operator""_u () |
User-defined literal operator to convert to | |
constexpr auto | operator""_u16 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_u32 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_u64 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_u8 () |
User-defined literal operator to convert to | |
constexpr auto | operator""_uc () |
User-defined literal operator to convert to | |
constexpr auto | operator""_ul () |
User-defined literal operator to convert to | |
constexpr auto | operator""_ull () |
User-defined literal operator to convert to | |
constexpr auto | operator""_us () |
User-defined literal operator to convert to | |
Description
C++ header file with declarations for the µTest++ user-defined literals and type wrappers.
This header provides the declarations for the user-defined literal operators and type wrappers used within the µTest++ framework. It defines interfaces for generating strongly-typed integral, floating-point, and boolean constants at compile time, enabling expressive and type-safe test expressions.
The declared literal operators support a wide range of C++ fundamental types, allowing constants to be suffixed with type-specific identifiers (such as _i
, _u16
, _f
, _d
, _b
, etc.) to produce values that integrate seamlessly with the µTest++ comparators and reporting mechanisms.
In addition to literal operators, this header declares both deprecated and modern type wrappers for explicit type conversion, supporting enhanced clarity and type safety in test conditions. The preferred to_*
forms are recommended for new code, while the older _i
, _u8
, etc. aliases are retained for backwards compatibility.
All definitions reside within the micro_os_plus::micro_test_plus::literals
namespace, ensuring clear separation from user code and minimising the risk of naming conflicts.
The header files are organised within the include/micro-os-plus/micro-test-plus
folder to maintain a structured and modular codebase.
This file is intended for internal use within the framework and should not be included directly by user code.
File Listing
The file content with the documentation metadata removed is:
Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.