micro-test-plus 4.1.0
µTest++ Testing Framework
Loading...
Searching...
No Matches
type-traits.h File Reference

C++ header file with declarations for the µTest++ type trait utilities and metaprogramming support. More...

#include <string_view>
#include <type_traits>
#include "math.h"
#include "inlines/type-traits-inlines.h"

Go to the source code of this file.

Classes

struct  micro_os_plus::micro_test_plus::type_traits::floating_point_constant< T, N, D, Size, P >
 Struct template representing a generic floating point constant with custom size and precision. More...
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(*)(Args_T...)>
 Struct template specialisation for extracting function traits from function pointer types. More...
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(Args_T...)>
 Struct template specialisation for extracting function traits from plain function types. More...
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(T::*)(Args_T...) const >
 Struct template specialisation for extracting function traits from const member function types. More...
struct  micro_os_plus::micro_test_plus::type_traits::function_traits< R(T::*)(Args_T...)>
 Struct template specialisation for extracting function traits from non-const member function types. More...
struct  micro_os_plus::micro_test_plus::type_traits::genuine_integral_value< T >
 Struct template representing a genuine integral value. More...
struct  micro_os_plus::micro_test_plus::type_traits::identity< T, Extra >
 Struct template for compile-time type identity. More...
struct  micro_os_plus::micro_test_plus::type_traits::integral_constant< N >
 Struct template representing a generic integral constant. More...
struct  micro_os_plus::micro_test_plus::type_traits::list< Types >
 Struct template representing a compile-time type list. More...
struct  micro_os_plus::micro_test_plus::type_traits::op
 Empty base struct for all operator types. More...
struct  micro_os_plus::micro_test_plus::type_traits::value< T >
 Struct template representing a generic value, accessible via a getter. More...
struct  micro_os_plus::micro_test_plus::type_traits::value< T >
 Struct template representing a floating point value with precision control. More...
struct  micro_os_plus::micro_test_plus::type_traits::value_base_< T >
 Base struct template providing common storage and accessors for runtime value-wrapper types. More...

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::type_traits
 Type trait utilities and metaprogramming support for the µTest++ testing framework.

Concepts

concept  micro_os_plus::micro_test_plus::type_traits::any_op
 C++20 concept satisfied when at least one of two types derives from op.
concept  micro_os_plus::micro_test_plus::type_traits::checkable
 C++20 concept satisfied when a type can be used as a test expression in expect() or assume().
concept  micro_os_plus::micro_test_plus::type_traits::container_like
 C++20 concept satisfied when T provides both begin() and end() member functions.
concept  micro_os_plus::micro_test_plus::type_traits::has_epsilon
 C++20 concept satisfied when T provides an epsilon member.
concept  micro_os_plus::micro_test_plus::type_traits::has_npos
 C++20 concept satisfied when T provides a npos member.
concept  micro_os_plus::micro_test_plus::type_traits::has_value
 C++20 concept satisfied when T provides a value member.
concept  micro_os_plus::micro_test_plus::type_traits::is_floating_point
 C++20 concept satisfied when T is a standard floating point type.
concept  micro_os_plus::micro_test_plus::type_traits::is_op
 C++20 concept satisfied when a type derives from op.
concept  micro_os_plus::micro_test_plus::type_traits::printable
 C++20 concept satisfied when a type can be appended to the deferred reporter's output via operator<<.

Detailed Description

This header provides the declarations for the type trait utilities and metaprogramming constructs used within the µTest++ framework. It defines templates and variable traits for function traits, type lists, identity, value wrappers, compile-time checks for container and floating-point types, and type convertibility.

These utilities underpin advanced template programming, type deduction, and compile-time introspection, supporting the flexible and type-safe design of the framework. The provided traits and wrappers enable expressive and generic handling of types, values, and callable objects, facilitating robust and maintainable test code.

All definitions reside within the micro_os_plus::micro_test_plus::type_traits namespace, ensuring clear separation from user code and minimising the risk of naming conflicts.

All 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.

Definition in file type-traits.h.