iceoryx_doc  1.0.1
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_UTILS_CXX_ALGORITHM_HPP
18 #define IOX_UTILS_CXX_ALGORITHM_HPP
19 
20 #include "iceoryx_utils/cxx/vector.hpp"
21 
22 #include <cstdint>
23 #include <type_traits>
24 
25 namespace iox
26 {
27 namespace algorithm
28 {
35 template <typename T>
36 constexpr T max(const T& left) noexcept;
37 
45 template <typename T>
46 constexpr T max(const T& left, const T& right) noexcept;
47 
55 template <typename T, typename... Targs>
56 constexpr T max(const T& left, const T& right, const Targs&... args) noexcept;
57 
64 template <typename T>
65 constexpr T min(const T& left) noexcept;
66 
74 template <typename T>
75 constexpr T min(const T& left, const T& right) noexcept;
76 
84 template <typename T, typename... Targs>
85 constexpr T min(const T& left, const T& right, const Targs&... args) noexcept;
86 
91 template <typename T, typename CompareType>
92 constexpr bool doesContainType() noexcept;
93 
98 template <typename T, typename CompareType, typename Next, typename... Remainder>
99 constexpr bool doesContainType() noexcept;
100 
107 template <typename Container>
108 Container uniqueMergeSortedContainers(const Container& v1, const Container& v2) noexcept;
109 } // namespace algorithm
110 } // namespace iox
111 
112 #include "iceoryx_utils/internal/cxx/algorithm.inl"
113 
114 #endif // IOX_UTILS_CXX_ALGORITHM_HPP
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28