# iox::algorithm🔗

## Functions🔗

Name
template \<typename T >
constexpr T
max(const T & left)
Returns the maximum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which is required as generic recursive template endpoint.
template \<typename T >
constexpr T
max(const T & left, const T & right)
Returns the maximum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which takes two arguments and returns the greater one.
template \<typename T ,typename... Targs>
constexpr T
max(const T & left, const T & right, const Targs &... args)
Returns the maximum gained with operator<() of an arbitrary amount of variables of the same type.
template \<typename T >
constexpr T
min(const T & left)
Returns the minimum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which is required as generic recursive template endpoint.
template \<typename T >
constexpr T
min(const T & left, const T & right)
Returns the minimum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which takes two arguments and returns the smaller one.
template \<typename T ,typename... Targs>
constexpr T
min(const T & left, const T & right, const Targs &... args)
Returns the minimum gained with operator<() of an arbitrary amount of variables of the same type.
template \<typename T ,typename CompareType >
constexpr bool
doesContainType()
Returns true if T is equal to CompareType, otherwise false.
template \<typename T ,typename CompareType ,typename Next ,typename... Remainder>
constexpr bool
doesContainType()
Returns true if T is contained the provided type list.
template \<typename Container >
Container
uniqueMergeSortedContainers(const Container & v1, const Container & v2)
Merging two sorted containers so that the result is a sorted container where every element is contained only once.

## Functions Documentation🔗

### function max🔗

``````template <typename T >
inline constexpr T max(
const T & left
)
``````

Returns the maximum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which is required as generic recursive template endpoint.

Parameters:

• T type which implements operator<()
• left value which should be compared

Return: returns the given argument left

### function max🔗

``````template <typename T >
inline constexpr T max(
const T & left,
const T & right
)
``````

Returns the maximum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which takes two arguments and returns the greater one.

Parameters:

• T type which implements operator<()
• left value which should be compared
• right value which should be compared

Return: returns the maximum value of the set {left, right}

### function max🔗

``````template <typename T ,
typename... Targs>
inline constexpr T max(
const T & left,
const T & right,
const Targs &... args
)
``````

Returns the maximum gained with operator<() of an arbitrary amount of variables of the same type.

Parameters:

• T type which implements operator<()
• left value which should be compared
• right value which should be compared
• args... an arbitrary amount of values

Return: returns the maximum value of the set {left, right, args...}

### function min🔗

``````template <typename T >
inline constexpr T min(
const T & left
)
``````

Returns the minimum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which is required as generic recursive template endpoint.

Parameters:

• T type which implements operator<()
• left value which should be compared

Return: returns the given argument left

### function min🔗

``````template <typename T >
inline constexpr T min(
const T & left,
const T & right
)
``````

Returns the minimum gained with operator<() of an arbitrary amount of variables of the same type. Helper function which takes two arguments and returns the smaller one.

Parameters:

• T type which implements operator<()
• left value which should be compared
• right value which should be compared

Return: returns the minimum of the set {left, right}

### function min🔗

``````template <typename T ,
typename... Targs>
inline constexpr T min(
const T & left,
const T & right,
const Targs &... args
)
``````

Returns the minimum gained with operator<() of an arbitrary amount of variables of the same type.

Parameters:

• T type which implements operator<()
• left value which should be compared
• right value which should be compared
• args... an arbitrary amount of values

Return: returns the minimum of the set {left, right, args...}

### function doesContainType🔗

``````template <typename T ,
typename CompareType >
inline constexpr bool doesContainType()
``````

Returns true if T is equal to CompareType, otherwise false.

Parameters:

• T type to compare to
• CompareType the type to which T is compared

Return: true if the types T and CompareType are equal, otherwise false

### function doesContainType🔗

``````template <typename T ,
typename CompareType ,
typename Next ,
typename... Remainder>
inline constexpr bool doesContainType()
``````

Returns true if T is contained the provided type list.

Parameters:

• T type to compare to
• CompareTypeNextRemainder the type list in which T should be contained

Return: true if the T is contained in the type list, otherwise false

### function uniqueMergeSortedContainers🔗

``````template <typename Container >
inline Container uniqueMergeSortedContainers(
const Container & v1,
const Container & v2
)
``````

Merging two sorted containers so that the result is a sorted container where every element is contained only once.

Parameters:

• v1 the first sorted input container
• v2 the second sorted input container

Template Parameters:

• Container container type which has to support emplace_back() and size()

Return: sorted container which contains the elements of v1 and v2 and where every element is unique

Updated on 26 April 2021 at 15:31:01 CEST