<div dir="ltr">There are numerous tests which use them such as:<div><br></div><div>std/containers/associative/map/map.special/member_swap.pass.cpp<br></div><div><br></div><div><div><i>    typedef std::pair<const int, double> V;</i></div><div><i>    typedef std::map<int, double> M;</i></div><div><i>    {</i></div><div><i>        V ar1[] =</i></div><div><i><span style="white-space:pre">        </span>{ };</i></div><div><i>        V ar2[] =</i></div><div><i>        { };</i></div><div><i>        M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));</i></div></div><div><i><br></i></div><div>These are non-standard GNU extensions, even in C++11 (as far as I read the standard at least).  Would there be objection to changing the test code here to be standard conformant?  My specific interest is MSVC, which can't compile this.</div><div><br></div><div>If it is essential to test empty arrays then a couple of choices would be:</div><div><br></div><div><i>V* ar1 = nullptr;</i></div><div><i>M m1(ar1, ar1);</i><br></div><div><i><br></i></div><div>(I'm not sure I like this as it is a little white box, in the sense you assume that ar1 being null (or garbage) is okay because you know it'll never get used).</div><div><br></div><div>or</div><div><br></div><div><i>V ar1[] = { V() };<br></i></div><div><i>M m1(ar1, ar1);</i><br></div><div><br></div><div>(At least ar1 points to something valid).</div><div><i><br></i></div><div><br></div></div>