#include <algorithm>
Go to the source code of this file.
|
template<class fwd_it_t , class T > |
bool | qx::contains (fwd_it_t itBegin, fwd_it_t itEnd, const T &value) |
| Check if range contains value. More...
|
|
template<class container_t , class T > |
bool | qx::contains (const container_t &container, const T &value) |
| Check if container contains value. More...
|
|
template<class fwd_it_t , class predicate_t > |
bool | qx::contains_if (fwd_it_t itBegin, fwd_it_t itEnd, const predicate_t &predicate) |
| Check if at least one of range's elements satisfies a predicate. More...
|
|
template<class container_t , class predicate_t > |
bool | qx::contains_if (const container_t &container, const predicate_t &predicate) |
| Check if at least one of range's elements satisfies a predicate. More...
|
|
template<class where_fwd_it_t , class what_fwd_it_t > |
constexpr bool | qx::contains_any (where_fwd_it_t itWhereBegin, where_fwd_it_t itWhereEnd, what_fwd_it_t itWhatBegin, what_fwd_it_t itWhatEnd) |
| Check that at least one element from the first range is equal to at least one element from the second range. More...
|
|
template<class where_container_t , class what_container_t > |
constexpr bool | qx::contains_any (const where_container_t &whereContainer, const what_container_t &whatContainer) |
| Check that at least one element from the first range is equal to at least one element from the second range. More...
|
|
- Author
- Khrapov
- Date
- 6.08.2022
- Copyright
- © Nick Khrapov, 2022. All right reserved.
Definition in file contains.h.
◆ contains() [1/2]
template<class container_t , class T >
bool qx::contains |
( |
const container_t & |
container, |
|
|
const T & |
value |
|
) |
| |
Check if container contains value.
- Template Parameters
-
container_t | - container type |
T | - value type |
- Parameters
-
container | - container to search in |
value | - value to check |
- Return values
-
- | true if container contains value |
Definition at line 40 of file contains.h.
◆ contains() [2/2]
template<class fwd_it_t , class T >
bool qx::contains |
( |
fwd_it_t |
itBegin, |
|
|
fwd_it_t |
itEnd, |
|
|
const T & |
value |
|
) |
| |
Check if range contains value.
- Template Parameters
-
fwd_it_t | - forward iterator type |
T | - value type |
- Parameters
-
itBegin | - range begin iterator |
itEnd | - range end iterator |
value | - value to check |
- Return values
-
- | true if range contains value |
Definition at line 26 of file contains.h.
◆ contains_any() [1/2]
template<class where_container_t , class what_container_t >
constexpr bool qx::contains_any |
( |
const where_container_t & |
whereContainer, |
|
|
const what_container_t & |
whatContainer |
|
) |
| |
|
constexpr |
Check that at least one element from the first range is equal to at least one element from the second range.
- Template Parameters
-
where_container_t | - first range's type |
what_container_t | - second range's type |
- Parameters
-
whereContainer | - first range |
whatContainer | - second range |
- Return values
-
Definition at line 107 of file contains.h.
◆ contains_any() [2/2]
template<class where_fwd_it_t , class what_fwd_it_t >
constexpr bool qx::contains_any |
( |
where_fwd_it_t |
itWhereBegin, |
|
|
where_fwd_it_t |
itWhereEnd, |
|
|
what_fwd_it_t |
itWhatBegin, |
|
|
what_fwd_it_t |
itWhatEnd |
|
) |
| |
|
constexpr |
Check that at least one element from the first range is equal to at least one element from the second range.
- Template Parameters
-
where_fwd_it_t | - first range's iterator type |
what_fwd_it_t | - second range's iterator type |
- Parameters
-
itWhereBegin | - first range's start iterator |
itWhereEnd | - first range's end iterator |
itWhatBegin | - second range's start iterator |
itWhatEnd | - second range's end iterator |
- Return values
-
Definition at line 85 of file contains.h.
◆ contains_if() [1/2]
template<class container_t , class predicate_t >
bool qx::contains_if |
( |
const container_t & |
container, |
|
|
const predicate_t & |
predicate |
|
) |
| |
Check if at least one of range's elements satisfies a predicate.
- Template Parameters
-
container_t | - container type |
predicate_t | - predicate type |
- Parameters
-
container | - container to search in |
predicate | - predicate to check |
- Return values
-
- | true if at least one of container elements satisfies predicate |
Definition at line 69 of file contains.h.
◆ contains_if() [2/2]
template<class fwd_it_t , class predicate_t >
bool qx::contains_if |
( |
fwd_it_t |
itBegin, |
|
|
fwd_it_t |
itEnd, |
|
|
const predicate_t & |
predicate |
|
) |
| |
Check if at least one of range's elements satisfies a predicate.
- Template Parameters
-
fwd_it_t | - forward iterator type |
predicate_t | - predicate type |
- Parameters
-
itBegin | - range begin iterator |
itEnd | - range end iterator |
predicate | - predicate to check |
- Return values
-
- | true if at least one of range elements satisfies a predicate |
Definition at line 55 of file contains.h.