Skip to main content

callable_op_ Struct

Common base struct for callable-wrapping operators. More...

Declaration

struct micro_os_plus::micro_test_plus::detail::callable_op_ { ... }

Included Headers

Base struct

structop

Empty base struct for all operator types. More...

Derived Structs

structthrows_<Callable_T, void>

Operator struct template to check if an expression throws any exception. More...

structnothrow_<Callable_T>

Operator struct template to check if an expression does not throw any exception. More...

structthrows_<Callable_T, Exception_T>

Operator struct template to check if an expression throws a specific exception. More...

structthrows_<Callable_T, void>

Operator struct template to check if an expression throws any exception. More...

Public Constructors Index

constexprcallable_op_ (bool value)

Constructs a callable operator with the pre-computed boolean result. More...

Public Operators Index

constexproperator bool () const

Conversion operator to boolean. More...

Private Member Attributes Index

const boolvalue_ {}

Stores the result of the callable invocation. More...

Description

Common base struct for callable-wrapping operators.

This base struct provides common functionality for operators that wrap callable invocations, particularly for exception-checking operations. Derived structs (such as throws_ and nothrow_) use this base to store and manage the pre-computed boolean result of a callable invocation, enabling consistent reporting and composition of exception-checking assertions.

Definition at line 597 of file detail.h.

Public Constructors

callable_op_()

micro_os_plus::micro_test_plus::detail::callable_op_::callable_op_ (bool value)
explicit constexpr

Constructs a callable operator with the pre-computed boolean result.

Parameters
value

The pre-computed boolean result of the invocation.

Stores the pre-computed boolean result in the private value_ member.

Declaration at line 605 of file detail.h, definition at line 525 of file detail-inlines.h.

525 constexpr callable_op_::callable_op_ (bool value) : value_{ value }
526 {
527 }

Reference value_.

Referenced by micro_os_plus::micro_test_plus::detail::nothrow_< Callable_T >::nothrow_, micro_os_plus::micro_test_plus::detail::throws_< Callable_T, Exception_T >::throws_ and micro_os_plus::micro_test_plus::detail::throws_< Callable_T, void >::throws_.

Public Operators

operator bool()

micro_os_plus::micro_test_plus::detail::callable_op_::operator bool ()
nodiscard constexpr

Conversion operator to boolean.

Parameters

None.

Returns

The result of the callable invocation.

Returns the pre-computed boolean result stored by the derived operator's constructor.

Declaration at line 615 of file detail.h, definition at line 535 of file detail-inlines.h.

535 operator bool () const
536 {
537 return value_;
538 }

Reference value_.

Private Member Attributes

value_

const bool micro_os_plus::micro_test_plus::detail::callable_op_::value_ {}

Stores the result of the callable invocation.

Definition at line 621 of file detail.h.

621 const bool value_{};

Referenced by callable_op_ and operator bool.


The documentation for this struct was generated from the following files:


Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.