42#ifndef MICRO_TEST_PLUS_DETAIL_H_
43#define MICRO_TEST_PLUS_DETAIL_H_
60#pragma GCC diagnostic push
61#pragma GCC diagnostic ignored "-Wpadded"
62#pragma GCC diagnostic ignored "-Waggregate-return"
64#pragma clang diagnostic ignored "-Wc++98-compat"
116 template <
class Expr_T>
141 [[nodiscard]]
constexpr auto
170 constexpr unary_op_ (
const T& t,
bool value);
179 [[nodiscard]]
constexpr
180 operator bool ()
const;
189 [[nodiscard]]
constexpr auto
222 template <
class Lhs_T,
class Rhs_T>
242 [[nodiscard]]
constexpr
243 operator bool ()
const;
252 [[nodiscard]]
constexpr auto
262 [[nodiscard]]
constexpr auto
304 template <
class Lhs_T,
class Rhs_T>
313 constexpr eq_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
317 template <
typename Lhs_T,
typename Rhs_T>
336 template <
class Lhs_T,
class Rhs_T>
345 constexpr ne_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
349 template <
typename Lhs_T,
typename Rhs_T>
368 template <
class Lhs_T,
class Rhs_T>
377 constexpr gt_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
381 template <
typename Lhs_T,
typename Rhs_T>
401 template <
class Lhs_T,
class Rhs_T>
411 constexpr ge_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
415 template <
typename Lhs_T,
typename Rhs_T>
434 template <
class Lhs_T,
class Rhs_T>
443 constexpr lt_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
447 template <
typename Lhs_T,
typename Rhs_T>
467 template <
class Lhs_T,
class Rhs_T>
477 constexpr le_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
481 template <
typename Lhs_T,
typename Rhs_T>
501 template <
class Lhs_T,
class Rhs_T>
510 constexpr and_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
514 template <
typename Lhs_T,
typename Rhs_T>
534 template <
class Lhs_T,
class Rhs_T>
543 constexpr or_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
547 template <
typename Lhs_T,
typename Rhs_T>
573 explicit constexpr not_ (
const T& t = {});
577 template <
typename T>
582#if defined(__cpp_exceptions)
614 [[nodiscard]]
constexpr
615 operator bool ()
const;
643 template <
class Callable_T,
class Exception_T =
void>
652 constexpr explicit throws_ (
const Callable_T& func);
672 template <
class Callable_T>
681 constexpr explicit throws_ (
const Callable_T& func);
700 template <
class Callable_T>
709 constexpr explicit nothrow_ (
const Callable_T& func);
728 requires std::is_arithmetic_v<T>
739#pragma GCC diagnostic pop
Local implementation of source location information for diagnostics.
C++ header file with inline implementations for the µTest++ internal detail namespace.
Internal implementation details for the µTest++ framework.
le_(const Lhs_T &, const Rhs_T &) -> le_< Lhs_T, Rhs_T >
or_(const Lhs_T &, const Rhs_T &) -> or_< Lhs_T, Rhs_T >
eq_(const Lhs_T &, const Rhs_T &) -> eq_< Lhs_T, Rhs_T >
ne_(const Lhs_T &, const Rhs_T &) -> ne_< Lhs_T, Rhs_T >
gt_(const Lhs_T &, const Rhs_T &) -> gt_< Lhs_T, Rhs_T >
and_(const Lhs_T &, const Rhs_T &) -> and_< Lhs_T, Rhs_T >
void append_number_(std::string &buffer, T v)
Appends the string representation of a numeric value to a buffer, using std::to_chars for allocation-...
constexpr auto get(const T &t)
Generic getter function template for value retrieval.
lt_(const Lhs_T &, const Rhs_T &) -> lt_< Lhs_T, Rhs_T >
ge_(const Lhs_T &, const Rhs_T &) -> ge_< Lhs_T, Rhs_T >
not_(const T &) -> not_< T >
Primary namespace for the µTest++ testing framework.
C++ header file with declarations for the µTest++ reflection utilities.
Logical AND comparator struct template.
constexpr and_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a logical AND comparator for the given operands.
Assertion struct template for parameter passing to the evaluator.
Expr_T expr
The expression under evaluation.
reflection::source_location location
The source location associated with the assertion.
const bool value_
Stores the result of the comparison.
constexpr auto lhs(void) const
Retrieves the left-hand operand.
constexpr binary_op_(const Lhs_T &lhs, const Rhs_T &rhs, bool value)
Constructs a binary comparator with the given operands and pre-computed result.
const Rhs_T rhs_
Stores the right-hand operand.
const Lhs_T lhs_
Stores the left-hand operand.
constexpr auto rhs(void) const
Retrieves the right-hand operand.
constexpr callable_op_(bool value)
Constructs a callable operator with the pre-computed boolean result.
const bool value_
Stores the result of the callable invocation.
Equality comparator struct template.
constexpr eq_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs an equality comparator for the given operands.
Greater than or equal comparator struct template.
constexpr ge_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a greater than or equal comparator for the given operands.
Greater than comparator struct template.
constexpr gt_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a greater than comparator for the given operands.
Less than or equal comparator struct template.
constexpr le_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a less than or equal comparator for the given operands.
Less than comparator struct template.
constexpr lt_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a less than comparator for the given operands.
Non-equality comparator struct template.
constexpr ne_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a non-equality comparator for the given operands.
Logical NOT comparator struct template.
constexpr not_(const T &t={})
Constructs a logical NOT comparator for the given operand.
constexpr nothrow_(const Callable_T &func)
Constructs a nothrow checking operator for the given callable.
Logical OR comparator struct template.
constexpr or_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a logical OR comparator for the given operands.
constexpr throws_(const Callable_T &func)
Constructs an exception checking operator for the given callable.
constexpr throws_(const Callable_T &func)
Constructs an exception checking operator for the given callable.
const T t_
Stores the operand.
constexpr auto operand() const
Retrieves the wrapped operand expression.
constexpr unary_op_(const T &t, bool value)
Constructs a unary comparator with the given operand and pre-computed result.
const bool value_
Stores the result of the operation.
Empty base struct for all operator types.
C++ header file with declarations for the µTest++ type trait utilities and metaprogramming support.