iceoryx_hoofs 2.0.3
algorithm.hpp
1// Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved.
2// Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16// SPDX-License-Identifier: Apache-2.0
17#ifndef IOX_HOOFS_CXX_ALGORITHM_HPP
18#define IOX_HOOFS_CXX_ALGORITHM_HPP
19
20#include <cstdint>
21#include <type_traits>
22
23namespace iox
24{
25namespace algorithm
26{
33template <typename T>
34constexpr T max(const T& left) noexcept;
35
43template <typename T>
44constexpr T max(const T& left, const T& right) noexcept;
45
53template <typename T, typename... Targs>
54constexpr T max(const T& left, const T& right, const Targs&... args) noexcept;
55
62template <typename T>
63constexpr T min(const T& left) noexcept;
64
72template <typename T>
73constexpr T min(const T& left, const T& right) noexcept;
74
82template <typename T, typename... Targs>
83constexpr T min(const T& left, const T& right, const Targs&... args) noexcept;
84
89template <typename T, typename CompareType>
90constexpr bool doesContainType() noexcept;
91
96template <typename T, typename CompareType, typename Next, typename... Remainder>
97constexpr bool doesContainType() noexcept;
98
102template <typename T>
103inline constexpr bool doesContainValue(const T) noexcept;
104
111template <typename T, typename... ValueList>
112inline constexpr bool
113doesContainValue(const T value, const T firstValueListEntry, const ValueList... remainingValueListEntries) noexcept;
114
121template <typename Container>
122Container uniqueMergeSortedContainers(const Container& v1, const Container& v2) noexcept;
123} // namespace algorithm
124} // namespace iox
125
126#include "iceoryx_hoofs/internal/cxx/algorithm.inl"
127
128#endif // IOX_HOOFS_CXX_ALGORITHM_HPP
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:29