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

PrevUpHomeNext

Configuration

Configuring Boost.TR1 is no different to configuring any other part of Boost; in the majority of cases you shouldn't actually need to do anything at all. However, because Boost.TR1 will inject Boost components into namespace std::tr1 it is more than usually sensitive to an incorrect configuration.

The intention is that Boost.Config will automatically define the configuration macros used by this library, so that if your standard library is set up to support TR1 (note that few are at present) then this will be detected and Boost.TR1 will use your standard library versions of these components rather than the Boost ones.

If you would prefer to use the Boost versions of the TR1 conponents rather than your standard library, then either: include the Boost headers directly

#include <boost/regex.hpp>

boost::regex e("myregex"); //etc

Or else don't enable TR1 in your standard library: since TR1 is not part of the current standard, there should be some option to disable it in your compiler or standard library.

The configuration macros used by each TR1 component are documented in each library section (and all together in the Boost.Config documentation), but defining BOOST_HAS_TR1 will turn on native TR1 support for everything (if your standard library has it), which can act as a convenient shortcut.


PrevUpHomeNext