Lightweight assertion comparison object that preserves compared operand values for diagnostics.
More...
#include <assert_compare.h>
|
| constexpr | assert_comparison (left_t &&left, right_t &&right) noexcept(std::is_nothrow_constructible_v< left_t, left_t && > &&std::is_nothrow_constructible_v< right_t, right_t && >) |
| | Construct comparison object from two operands. More...
|
| |
| constexpr bool | result () const noexcept(noexcept(operation_t {}(left(), right()))) |
| | Evaluate comparison. More...
|
| |
| constexpr | operator bool () const noexcept(noexcept(result())) |
| | Convert comparison object to bool. More...
|
| |
| constexpr const auto & | left () const noexcept |
| | Get left operand. More...
|
| |
| constexpr const auto & | right () const noexcept |
| | Get right operand. More...
|
| |
template<class left_t, class right_t, class operation_t, bool bLeftIsLvalue, bool bRightIsLvalue>
class qx::details::assert_comparison< left_t, right_t, operation_t, bLeftIsLvalue, bRightIsLvalue >
Lightweight assertion comparison object that preserves compared operand values for diagnostics.
- Template Parameters
-
| left_t | - left operand type |
| right_t | - right operand type |
| operation_t | - operation type, must be a specialization of std binary function (e.g. std::equal_to<>, std::less<>, etc.) |
| bLeftIsLvalue | - whether the left operand was passed as an lvalue |
| bRightIsLvalue | - whether the right operand was passed as an lvalue |
- Author
- Khrapov
- Date
- 19.05.2026
Definition at line 40 of file assert_compare.h.
◆ assert_comparison()
template<class left_t , class right_t , class operation_t , bool bLeftIsLvalue, bool bRightIsLvalue>
Construct comparison object from two operands.
- Parameters
-
| left | - left operand |
| right | - right operand |
Definition at line 434 of file assert_compare.inl.
◆ left()
template<class left_t , class right_t , class operation_t , bool bLeftIsLvalue, bool bRightIsLvalue>
◆ operator bool()
template<class left_t , class right_t , class operation_t , bool bLeftIsLvalue, bool bRightIsLvalue>
|
|
explicitconstexprnoexcept |
◆ result()
template<class left_t , class right_t , class operation_t , bool bLeftIsLvalue, bool bRightIsLvalue>
◆ right()
template<class left_t , class right_t , class operation_t , bool bLeftIsLvalue, bool bRightIsLvalue>
The documentation for this class was generated from the following files: