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 an older version of Boost and was released in 2021. The current version is 1.89.0.
All sections in the reference present some real world examples. The examples use a common test harness to keep the example code as minimal and direct to the point as possible. The test harness is presented below.
Some includes:
#include <boost/spirit/include/lex.hpp> #include <boost/phoenix/core.hpp> #include <boost/phoenix/operator.hpp> #include <iostream> #include <string>
Our test functions:
This one tests token definitions.
Predefined models include:
std::basic_string<Char>
The namespace boost::spirit::traits is open for users to provide their
own specializations.