<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 23, 2015 at 3:24 PM, Nelson, Clark <span dir="ltr">&lt;<a href="mailto:clark.nelson@intel.com" target="_blank">clark.nelson@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The name __cpp_nested_namespace_definitions seems pretty obvious and<br>
non-controversial.<br>
<br>
But I don&#39;t think we&#39;ve actually considered whether a new macro would be<br>
justified. How would a reasonable person write code that works both with and<br>
without this feature?<br>
<br>
#if __cpp_nested_namespace_definitions<br>
#define NND(x) x::<br>
#else<br>
#define NND(x)<br>
#endif<br>
<br>
#if !__cpp_nested_namespace_definitions<br>
namespace X { namespace Y {<br>
#endif<br>
void NND(X::Y) f()<br>
{<br>
}<br>
#if !__cpp_nested_namespace_definitions<br>
}}<br>
#endif<br>
<br>
Is it plausible that someone would write code like that? If they cared about<br>
portability to C++14, would they be more likely to just ignore this new<br>
feature, and write their code the old way?<br></blockquote><div><br></div><div>A reasonable question... but why ask about it for just this one case?  I&#39;d think that this is true for many of the features for which we have feature test macros. </div><div><br></div><div>__cpp_auto_deduction was one that came up most recently.  If you need portability, you just don&#39;t rely on auto deduction from a braced-initializer-list.  If you want a T, you use parens; if you want an initializer_list&lt;T&gt;, you say so.<br></div><div><br></div><div>I&#39;ve not surveyed the other macros with an eye towards which would be useful for writing portable code.  My unsubstantiated guess is that a large fraction aren&#39;t useful for portability, beyond just giving a clear #error message.</div><div><br></div><div>-- James</div><div><br></div></div></div></div>