mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
f61c34b9c7
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@432 f6dd340e-d3f9-0310-b409-bdd246841980
21 lines
1 KiB
Text
21 lines
1 KiB
Text
The i(logical operators) are called by the
|
|
hi(function object: logical)hi(logical function object) logical function
|
|
objects. The standard logical operators are supported: tt(and, or,) and
|
|
tt(not).
|
|
|
|
The STL supports the following set of logical function objects:
|
|
itemization(
|
|
itht(logical_and)(logical_and<>): this object's tt(operator()) member
|
|
calls ti(operator&&), passing the latter operator its two parameter values and
|
|
returning the latter operator's return value.
|
|
itht(logical_or)(logical_or<>): this object's tt(operator()) member calls
|
|
ti(operator||), passing the latter operator its two parameter values and
|
|
returning the latter operator's return value.
|
|
itht(logical_not)(logical_not<>): this object's tt(operator()) member
|
|
calls tt(operator!), passing the latter operator its parameter and returning
|
|
the latter operator's return value.
|
|
)
|
|
An example using tt(operator!) is provided in the following trivial
|
|
program, using ti(transform) to transform
|
|
the logicalvalues stored in an array:
|
|
verbinclude(stl/examples/not.cc)
|