On 2017.02.06 at 18:13 +0100, Marek Polacek wrote:
> This patch adds a description of something I noticed while doing the 
> Fedora mass rebuild.  Do we want to say more about the invalidity of
> the incomplete type case?
> +<p>
> +GCC 7 no longer accepts ill-formed code involving use of an incomplete type:
> +<pre><code>
> +namespace N {
> +class C;
> +class A {
> +  C fn1();
> +};
> +template <typename> class B : A {
> +  void fn2() { fn1().x; }
> +};
> +}
> +</code></pre>
> +</p>
> +

You could drop the namespace. Also "struct A" would be better, because
otherwise fn1 is a private and thus unaccessible in fn2.

You could also mention Chromium and Node.js as prominent examples.

-- 
Markus

Reply via email to