From: John Maddock (john_at_[hidden])
Date: 2005-09-24 07:07:06


>Yes, I noticed that. It's a really neat idea, but I have no clue
>whether it's practical. Actually I do at least have a _clue_.
>Depending on the level of PP usage in a Boost header, it could be very
>difficult to identify all the places that symbols need to be changed.
>And even then a naive "replace the boost identifier" strategem is not
>guaranteed to work unless we all maintain an agreement that "boost" is
>never to be used as an identifier other than for the outer boost
>namespace. I'm not sure what other issues are lurking in there;
>these are just the two that popped into my head immediately.

I think what Bjorn's looking for may be possible: there are only a limited
number of contexts in which a namespace name can occur, and I think we can
locate and patch all of them with regexes, ignoring variations in whitespace
they would be:

namespace boost{
using namespace boost;
boost::

I don't think there are any others?

It's certainly true that this mechanism could be messed up by macro usage if
you try hard enough, but I don't think we have any code that does that (I'm
assuming that occurrence of these patterns *within* macro definitions would
still get replaced).

I guess the we'd just have to try it and see if any current libraries break
this idiom.

John.