|
| template<typename TV, typename TE, class = typename std::enable_if_t<std::is_convertible_v<TE,TV>>> |
| bool | is_in (const std::vector< TV > &vect, const TE &elem) |
| | Returns true if an item of type TE is in a vector of TV objects (provided that TE can be converted into TV), false otherwise.
|
| |
| template<typename TV, typename TE, class = typename std::enable_if_t<std::is_convertible_v<TE,TV>>> |
| bool | any_of_is_in (const std::vector< TV > &vect, const std::vector< TE > &elems) |
| | Returns true if any of the items of a vector<TE> is contained in another vector<TV> (provided that TE can be converted into TV)
|
| |
template<typename TV, typename TE, class = typename std::enable_if_t<std::is_convertible_v<TE,TV>>>
| bool utils::algorithms::is_in |
( |
const std::vector< TV > & | vect, |
|
|
const TE & | elem ) |
Returns true if an item of type TE is in a vector of TV objects (provided that TE can be converted into TV), false otherwise.
- Template Parameters
-
| TV | the typename of the vector elements |
| TE | the typename of the item |
- Parameters
-
| vect | a vector of TV objects |
| elem | an object of type TE |
- Returns
- true if elem is in vect, false otherwise