Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-11-25 07:38:21

>Is there any reason not to recommend the anonymous namespace, which
>guarantees a unique name?

Yes, the problem is when two headers included by the same translation unit
use namespace scope static assertions - if the assertions are on the same
line in their header files, and in the same namespace, then some compilers
complain, others generate warnings, but otherwise accept the code. It's
easier to suggest a unique namespace, than to try to explain why in some
really obsure case the code stops working...

- John Maddock

Boost list run by bdawes at, gregod at, cpdaniel at, john at