I’m looking to have two versions of BOOST compiled into a project at the same time. Ideally they should be usable along these lines:
boost_1_36_0::boost::shared_ptr<SomeClass> someClass = new SomeClass(); boost_1_35_0::boost::regex expression('[0-9]', boost_1_35_0::boost::regex_constants::basic);
I read (well scanned) through the development list discussion. There’s no easy solution. To sum up:
Wrapping header files in a namespace declaration
Defining boost before including headers
-Dboost=boost_1_36_0Some internal header file inclusions may be messed up, since this sort of thing does happen.
But it may be easy enough to work around those cases.
namespace boost {..}withnamespace boost_1_36_0 {...}and then providing a namespace alias. Replace allBOOST_XYZmacros and their uses withBOOST_1_36_0_XYZmacros.