Boost logo

Boost :

Subject: Re: [boost] [type_traits][general] Best practice for inline namespaces?
From: John Maddock (boost.regex_at_[hidden])
Date: 2015-01-18 12:10:04


> FWIW, I'm using inline namespaces (or emulation in C++03) in Boost.Log,
> although I don't inject Boost version. Works quite well in detecting
> configuration mismatch cases, when user's code is compiled in a mode
> incompatible with the compiled library. I'm not sure how useful this would be
> with TypeTraits though, given that the traits are compile-time constructs and
> ABI compatibility is not an issue.

I think you may have hit the nail on head there: are inline namespaces
of any use for header-only code? I can see the logic for mangling the
names when you're linking to an external lib, but for something like
type_traits we can just as well leave things as they are and use a
nested namespace for any "archived" old versions of the code.

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk