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

Spirit Classic

The Spirit V1.8.x code base has been integrated with Spirit V2. It is now called Spirit.Classic. Since the directory structure has changed (the Spirit Classic headers are now moved to the $BOOST_ROOT/boost/spirit/home/classic directory), we created forwarding headers allowing existing applications to compile without any change. However, these forwarding headers are deprecated, which will result in corresponding warnings generated for each of the headers starting with Boost V1.38. The forwarding headers are expected to be removed in the future.

The recommended way of using Spirit Classic now is to include header files from the directory $BOOST_ROOT/boost/spirit/include. All Spirit Classic headers in this directory have 'classic_' prefixed to their name. For example the include

#include <boost/spirit/core/core.hpp>

now should be written as:

#include <boost/spirit/include/classic_core.hpp>

To avoid namespace conflicts with the new Spirit V2 library we moved Spirit Classic into the namespace boost::spirit::classic. All references to the former namespace boost::spirit need to be adjusted as soon as the header names are corrected as described above. As an alternative you can define the preprocessor constant BOOST_SPIRIT_USE_OLD_NAMESPACE, which will force the Spirit Classic code to be in the namespace boost::spirit as before. This is not recommended, though, as it may result in naming clashes.

The change of the namespace will be automatically deactivated whenever the deprecated include files are being used. This ensures full backwards compatibility for existing applications.


PrevUpHomeNext