Loading [MathJax]/extensions/tex2jax.js
NiHu
2.0
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Typedefs
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
c
d
f
i
m
n
p
q
r
s
t
v
x
Typedefs
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
v
w
x
y
Enumerator
d
i
j
k
l
m
n
o
p
q
r
s
t
Files
File List
File Members
All
Functions
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
misc.hpp
Go to the documentation of this file.
1
#ifndef MISC_H_INCLUDED
4
#define MISC_H_INCLUDED
5
6
namespace
NiHu
7
{
8
9
19
template
<
class
InputIterator,
class
OutputIterator,
class
Predicate>
20
InputIterator
move_if
(InputIterator first, InputIterator last, OutputIterator result, Predicate pred)
21
{
22
InputIterator to = first;
23
while
(first != last)
24
{
25
if
(pred(*first))
26
*result++ = *first++;
27
else
28
*to++ = *first++;
29
}
30
return
to;
31
}
32
33
34
}
// namespace NiHu
35
36
#endif
NiHu::move_if
InputIterator move_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred)
move selected elements from a range to an other
Definition:
misc.hpp:20
src
util
misc.hpp
Generated on Thu Mar 27 2025 01:00:17 for NiHu by
1.8.18