Quick A: For source-level library versioning.
A StackOverflow classic:
What are inline namespaces for?
C++11 allows
inline namespace
s, all members of which are also automatically in the enclosing namespace. I cannot think of any useful application of this -- can somebody please give a brief, succinct example of a situation where aninline namespace
is needed and where it is the most idiomatic solution?(Also, it is not clear to me what happens when a
namespace
is declared inline in one but not all declarations, which may live in different files. Isn't this begging for trouble?)
Add a Comment
Comments are closed.