C++ Logo


Advanced search

[SG10] N4230 Nested namespace definition

From: Nelson, Clark <clark.nelson_at_[hidden]>
Date: Mon, 23 Mar 2015 22:24:07 +0000
The name __cpp_nested_namespace_definitions seems pretty obvious and

But I don't think we've actually considered whether a new macro would be
justified. How would a reasonable person write code that works both with and
without this feature?

#if __cpp_nested_namespace_definitions
#define NND(x) x::
#define NND(x)

#if !__cpp_nested_namespace_definitions
namespace X { namespace Y {
void NND(X::Y) f()
#if !__cpp_nested_namespace_definitions

Is it plausible that someone would write code like that? If they cared about
portability to C++14, would they be more likely to just ignore this new
feature, and write their code the old way?


Received on 2015-03-23 23:24:12