<s>
In	O
the	O
context	O
of	O
the	O
programming	O
language	O
C++	B-Language
,	O
functional	O
refers	O
to	O
a	O
header	B-Language
file	I-Language
that	O
is	O
part	O
of	O
the	O
C++	B-Language
Standard	I-Language
Library	I-Language
and	O
provides	O
a	O
set	O
of	O
predefined	O
class	O
templates	O
for	O
function	B-Language
objects	I-Language
,	O
including	O
operations	O
for	O
arithmetic	O
,	O
comparisons	O
,	O
and	O
logic	O
.	O
</s>
<s>
Instances	O
of	O
these	O
class	O
templates	O
are	O
C++	B-Application
classes	I-Application
that	O
define	O
a	O
function	O
call	O
operator	O
,	O
and	O
the	O
instances	O
of	O
these	O
classes	O
can	O
be	O
called	O
as	O
if	O
they	O
were	O
functions	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
perform	O
very	O
sophisticated	O
operations	O
without	O
writing	O
a	O
new	O
function	B-Language
object	I-Language
,	O
simply	O
by	O
combining	O
predefined	O
function	B-Language
objects	I-Language
and	O
function	B-Language
object	I-Language
adaptors	O
.	O
</s>
<s>
The	O
class	O
template	O
std::function	O
provided	O
by	O
C++11	B-Language
is	O
a	O
general-purpose	O
polymorphic	B-Application
function	I-Application
wrapper	O
.	O
</s>
<s>
Instances	O
of	O
std::function	O
can	O
store	O
,	O
copy	O
,	O
and	O
invoke	O
any	O
callable	O
target	O
—	O
functions	O
,	O
lambda	B-General_Concept
expressions	I-General_Concept
(	O
expressions	O
defining	O
anonymous	B-General_Concept
functions	I-General_Concept
)	O
,	O
bind	O
expressions	O
(	O
instances	O
of	O
function	O
adapters	O
that	O
transform	O
functions	O
to	O
other	O
functions	O
of	O
smaller	O
arity	O
by	O
providing	O
values	O
for	O
some	O
of	O
the	O
arguments	O
)	O
,	O
or	O
other	O
function	B-Language
objects	I-Language
.	O
</s>
<s>
The	O
algorithms	B-Language
provided	O
by	O
the	O
C++	B-Language
Standard	I-Language
Library	I-Language
do	O
not	O
require	O
function	B-Language
objects	I-Language
of	O
more	O
than	O
two	O
arguments	O
.	O
</s>
<s>
Function	B-Language
objects	I-Language
that	O
return	O
Boolean	O
values	O
are	O
an	O
important	O
special	O
case	O
.	O
</s>
<s>
In	O
general	O
,	O
a	O
function	B-Language
object	I-Language
has	O
restrictions	O
on	O
the	O
type	O
of	O
its	O
argument	O
.	O
</s>
<s>
An	O
adaptable	O
function	B-Language
object	I-Language
,	O
however	O
,	O
does	O
specify	O
what	O
the	O
argument	O
and	O
return	O
types	O
are	O
,	O
and	O
provides	O
nested	O
s	O
so	O
that	O
those	O
types	O
can	O
be	O
named	O
and	O
used	O
in	O
programs	O
.	O
</s>
<s>
The	O
C++	B-Language
Standard	I-Language
Library	I-Language
provides	O
base	O
classes	O
and	O
to	O
simplify	O
the	O
definition	O
of	O
adaptable	O
unary	O
functions	O
and	O
adaptable	O
binary	O
functions	O
.	O
</s>
<s>
Adaptable	O
function	B-Language
objects	I-Language
are	O
important	O
,	O
because	O
they	O
can	O
be	O
used	O
by	O
function	B-Language
object	I-Language
adaptors	O
:	O
function	B-Language
objects	I-Language
that	O
transform	O
or	O
manipulate	O
other	O
function	B-Language
objects	I-Language
.	O
</s>
<s>
The	O
C++	B-Language
Standard	I-Language
Library	I-Language
provides	O
many	O
different	O
function	B-Language
object	I-Language
adaptors	O
,	O
including	O
(	O
that	O
returns	O
the	O
logical	O
complement	O
of	O
the	O
value	O
returned	O
by	O
a	O
particular	O
adaptable	O
predicate	O
)	O
,	O
and	O
and	O
,	O
which	O
perform	O
composition	O
of	O
function	B-Language
object	I-Language
.	O
</s>
<s>
The	O
C++	B-Language
Standard	I-Language
Library	I-Language
includes	O
in	O
the	O
header	B-Language
file	I-Language
functional	O
many	O
different	O
predefined	O
function	B-Language
objects	I-Language
,	O
including	O
arithmetic	O
operations	O
(	O
,	O
,	O
,	O
,	O
,	O
and	O
)	O
,	O
comparisons	O
(	O
,	O
,	O
,	O
,	O
,	O
and	O
)	O
,	O
and	O
logical	O
operations	O
(	O
,	O
,	O
and	O
)	O
.	O
</s>
<s>
Function	O
wrappers	O
can	O
be	O
used	O
to	O
make	O
calls	O
to	O
ordinary	O
functions	O
or	O
to	O
functions	O
objects	O
created	O
by	O
lambda	B-General_Concept
expressions	I-General_Concept
.	O
</s>
<s>
Function	O
wrappers	O
also	O
can	O
be	O
used	O
to	O
access	O
member	B-Application
variables	I-Application
and	O
member	O
functions	O
of	O
classes	O
.	O
</s>
