Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Operator

Sequences (a << b)
Alternative (a | b)
Kleene Star (*a)
Plus (+a)
Lists (a % b)
Optional (-a)
And Predicate (&a)
Not Predicate (!a)

Operators are used as a means for object composition and embedding. Simple generators may be composed to form composites through operator overloading, crafted to approximate the syntax of Parsing Expression Grammar (PEG). An expression such as:

a | b

yields a new generator type which is a composite of its operands, a and b.

This module includes different generators which get instantiated if one of the overloaded operators is used with more primitive generator constructs. It includes sequences (a << b), alternatives (a | b), Kleene star (unary *), plus (unary +), optional (unary -), lists (a % b), and the two predicates, the and predicate (unary &) and the not predicate (unary !).

Module Header
// forwards to <boost/spirit/home/karma/operator.hpp>
#include <boost/spirit/include/karma_operator.hpp>

Also, see Include Structure.


PrevUpHomeNext