48#ifndef MICRO_TEST_PLUS_REFLECTION_INLINES_H_
49#define MICRO_TEST_PLUS_REFLECTION_INLINES_H_
64#pragma GCC diagnostic push
65#pragma GCC diagnostic ignored "-Waggregate-return"
67#pragma clang diagnostic ignored "-Wc++98-compat"
68#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
80#if !defined(__cpp_lib_source_location)
90 [[nodiscard]]
constexpr auto
103 [[nodiscard]]
constexpr auto
113 [[nodiscard]]
constexpr auto
132 [[nodiscard]]
constexpr auto
135#if defined(__clang__)
136#pragma GCC diagnostic push
137#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
140 return { &__PRETTY_FUNCTION__[78],
sizeof (__PRETTY_FUNCTION__) - 80 };
141#pragma GCC diagnostic pop
142#elif defined(__GNUC__)
145 return { &__PRETTY_FUNCTION__[93],
sizeof (__PRETTY_FUNCTION__) - 144 };
147#error "Unsupported compiler"
148 return "Unsupported compiler";
159#pragma GCC diagnostic pop
Local implementation of source location information for diagnostics.
unsigned int line_
The line number where the source location was captured.
constexpr auto file_name(void) const noexcept
Retrieve the file name associated with this source location.
constexpr auto line(void) const noexcept
Retrieve the line number associated with this source location.
static constexpr auto current(const char *file="unknown", unsigned int line={}) noexcept
Obtain the current source location.
const char * file_
The file name where the source location was captured.
Reflection utilities for the µTest++ testing framework.
constexpr auto type_name(void) -> std::string_view
Extract the type name from the __PRETTY_FUNCTION__ macro.
Primary namespace for the µTest++ testing framework.