micro-test-plus 6.0.1
µTest++ Testing Framework
Loading...
Searching...
No Matches
reflection-inlines.h File Reference

C++ header file with inline implementations for the µTest++ reflection utilities. More...

#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  micro_os_plus
 The primary namespace for the µOS++ framework.
namespace  micro_os_plus::micro_test_plus
 Primary namespace for the µTest++ testing framework.
namespace  micro_os_plus::micro_test_plus::reflection
 Reflection utilities for the µTest++ testing framework.

Functions

template<class T>
constexpr auto micro_os_plus::micro_test_plus::reflection::type_name (void) -> std::string_view
 Extracts the type name from the __PRETTY_FUNCTION__ identifier.

Detailed Description

This header provides the inline implementations for the reflection utilities used within the µTest++ framework. It includes the logic for capturing and reporting source location information, such as file names and line numbers, as well as utilities for extracting type names at compile time using compiler-specific macros.

The source_location implementation offers a lightweight, constexpr-compatible alternative to std::source_location, used when the standard library does not provide it. The type_name utility parses the compiler-specific __PRETTY_FUNCTION__ string to obtain human-readable type names for improved test output and debugging.

All definitions reside within the micro_os_plus::micro_test_plus::reflection namespace.

This file is included by reflection.h; the applications include micro-os-plus/micro-test-plus.h, not this file.

Definition in file reflection-inlines.h.