<div dir="ltr">The attached patch implements DR85 [*] which disallows the existence of a declaration of a member class that isn't a forward declaration before it's definition.<div><br></div><div>This means that the following would be disallowed:</div>
<div>class A {</div>  struct B; // note here<br class="">  struct B; // error here<div>};</div><div><br></div><div style>as well as:</div><div style>class C {</div><div style>  struct B {}; // note here</div><div style>  struct B; // error here</div>
<div style>};</div><div style><br></div><div style>I'm very open to suggestions on the diagnostic, I couldn't think of a great one that doesn't boil down to "this is forbidden because the standard says so."</div>
<div><div><div><br></div><div>[*] <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#85">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#85</a></div><div><br></div><div style>Thanks</div><div style>
-- </div><div style>David Majnemer</div></div></div></div>