tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
weakly_equality_comparable_with.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_CONCEPTS_WEAKLY_EQUALITY_COMPAREABLE_WITH_HPP
4
#define TETL_CONCEPTS_WEAKLY_EQUALITY_COMPAREABLE_WITH_HPP
5
6
#include <
etl/_concepts/boolean_testable.hpp
>
7
#include <
etl/_concepts/convertible_to.hpp
>
8
#include <
etl/_type_traits/remove_reference.hpp
>
9
10
namespace
etl
{
11
12
// clang-format off
13
17
template
<
typename
T,
typename
U>
18
concept
weakly_equality_comparable_with
=
requires
(
remove_reference_t<T>
const
& t,
remove_reference_t<U>
const
& u) {
19
{ t == u } ->
boolean_testable
;
20
{ t != u } ->
boolean_testable
;
21
{ u == t } ->
boolean_testable
;
22
{ u != t } ->
boolean_testable
;
23
};
24
25
// clang-format on
26
27
}
// namespace etl
28
29
#endif
// TETL_CONCEPTS_WEAKLY_EQUALITY_COMPAREABLE_WITH_HPP
boolean_testable.hpp
etl::boolean_testable
Definition
boolean_testable.hpp:20
etl::weakly_equality_comparable_with
Definition
weakly_equality_comparable_with.hpp:18
convertible_to.hpp
etl::remove_reference_t
typename remove_reference< T >::type remove_reference_t
Definition
remove_reference.hpp:28
etl
Definition
adjacent_find.hpp:8
remove_reference.hpp
include
etl
_concepts
weakly_equality_comparable_with.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0