Subject: Re: [boost] [bcp] Bcp namespace rename causes compile errors onmultiple libraries (type_traits, range, spirit, foreach, regex, iostreams) in 1.43
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-05-28 04:34:55


You may give a try to this script I written once and use for my needs:

The script: http://art-blog.no-ip.info/files/rename.py
Some background: http://stackoverflow.com/questions/836875

It would work as it replaces both ".*BOOST.*" and ".*boost.*" tokens and
does this for macros as well.

There is a small but important difference - it renames also
includes so you do includes as

  #include <my_boost_namespace/shared_ptr.hpp>

Instead of

  #include <boost/shared_ptr.hpp>

So this actually allows to use two version of boost in same unit.

Important notice:

Boost.Regex defines extern "C" symbols for POSIX regex API as
like regexec(A|W) and regcomp(A|W) without boost prefix. So you should
still be very careful about using two versions of regex in same unit.

Artyom