Non-Modifying Algorithms
Non-modifying algorithms are algorithms for searching and counting elements. However, you can also check properties on ranges, compare ranges or search for ranges within ranges.
Search Elements
You can search for elements in three different ways.
Returns an element in a range:
InpIt
find
(
InpIt
first
,
InpI
last
,
const
T
&
val
)
InpIt
find
(
ExePol
pol
,
FwdIt
first
,
FwdIt
last
,
const
T
&
val
)
InpIt
find_if
(
InpIt
first
,
InpIt
last
,
UnPred
pred
)
InpIt
find_if
(
ExePol
pol
,
FwdIt
first
,
FwdIt
last
,
UnPred
pred
)
InpIt
find_if_not
(
InpIt
first
,
InpIt
last
,
UnPred
pre
)
InpIt
find_if_not
(
ExePol
pol
,
FwdIt
first
,
FwdIt
last
,
UnPred
pre
)
Returns the first element of a range in a range:
FwdIt1
find_first_of
(
InpIt1
first1
,
InpIt1
last1
,
FwdIt2
first2
,
FwdIt2
last2
)
FwdIt1
find_first_of
(
ExePol
pol
,
FwdIt1
first1
,
FwdIt1
last1
,
FwdIt2
first2
,
FwdIt2
last2
)
FwdIt1
find_first_of
(
InpIt1
first1
,
InpIt1
last1
,
...