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// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_CONCEPTS_WEAKLY_EQUALITY_COMPAREABLE_WITH_HPP
5#define TETL_CONCEPTS_WEAKLY_EQUALITY_COMPAREABLE_WITH_HPP
6
7#include <etl/_concepts/boolean_testable.hpp>
8#include <etl/_concepts/convertible_to.hpp>
9#include <etl/_type_traits/remove_reference.hpp>
10
11namespace etl {
12
13// clang-format off
14
15/// \note Non-standard extension
16/// \headerfile etl/concepts.hpp
17/// \ingroup concepts
18template<typename T, typename U>
19concept weakly_equality_comparable_with = requires(remove_reference_t<T> const& t, remove_reference_t<U> const& u) {
20 { t == u } -> boolean_testable;
21 { t != u } -> boolean_testable;
22 { u == t } -> boolean_testable;
23 { u != t } -> boolean_testable;
24};
25
26// clang-format on
27
28} // namespace etl
29
30#endif // TETL_CONCEPTS_WEAKLY_EQUALITY_COMPAREABLE_WITH_HPP
Definition adjacent_find.hpp:9