tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
named_functions.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_COMPARE_NAMED_FUNCTIONS_HPP
5#define TETL_COMPARE_NAMED_FUNCTIONS_HPP
6
7#include <etl/_compare/partial_ordering.hpp>
8
9namespace etl {
10
11/// \ingroup compare
12[[nodiscard]] constexpr auto is_eq(partial_ordering cmp) noexcept -> bool
13{
14 return cmp == nullptr;
15}
16
17/// \ingroup compare
18[[nodiscard]] constexpr auto is_neq(partial_ordering cmp) noexcept -> bool
19{
20 return cmp != nullptr;
21}
22
23/// \ingroup compare
24[[nodiscard]] constexpr auto is_lt(partial_ordering cmp) noexcept -> bool
25{
26 return cmp < nullptr;
27}
28
29/// \ingroup compare
30[[nodiscard]] constexpr auto is_lteq(partial_ordering cmp) noexcept -> bool
31{
32 return cmp <= nullptr;
33}
34
35/// \ingroup compare
36[[nodiscard]] constexpr auto is_gt(partial_ordering cmp) noexcept -> bool
37{
38 return cmp > nullptr;
39}
40
41/// \ingroup compare
42[[nodiscard]] constexpr auto is_gteq(partial_ordering cmp) noexcept -> bool
43{
44 return cmp >= nullptr;
45}
46
47} // namespace etl
48
49#endif // TETL_COMPARE_NAMED_FUNCTIONS_HPP
constexpr auto is_lt(partial_ordering cmp) noexcept -> bool
Definition named_functions.hpp:24
constexpr auto is_neq(partial_ordering cmp) noexcept -> bool
Definition named_functions.hpp:18
constexpr auto is_gteq(partial_ordering cmp) noexcept -> bool
Definition named_functions.hpp:42
constexpr auto is_eq(partial_ordering cmp) noexcept -> bool
Definition named_functions.hpp:12
constexpr auto is_lteq(partial_ordering cmp) noexcept -> bool
Definition named_functions.hpp:30
constexpr auto is_gt(partial_ordering cmp) noexcept -> bool
Definition named_functions.hpp:36
Definition adjacent_find.hpp:9
Definition partial_ordering.hpp:13
friend constexpr auto operator==(partial_ordering v, nullptr_t) noexcept -> bool
Definition partial_ordering.hpp:19
friend constexpr auto operator>=(partial_ordering v, nullptr_t) noexcept -> bool
Definition partial_ordering.hpp:41
friend constexpr auto operator<=(partial_ordering v, nullptr_t) noexcept -> bool
Definition partial_ordering.hpp:36
friend constexpr auto operator<(partial_ordering v, nullptr_t) noexcept -> bool
Definition partial_ordering.hpp:26
friend constexpr auto operator>(partial_ordering v, nullptr_t) noexcept -> bool
Definition partial_ordering.hpp:31