C++ Logo

SG7

Advanced search

Subject: Re: SG7 Digest, Vol 11, Issue 2
From: Andrew Sutton (asutton.list_at_[hidden])
Date: 2020-11-04 07:59:20


>
> Even if you declare a forward class D the error still persists...
>
> struct A2 {
> struct B {};
> struct D;
> consteval {
> -> fragment struct {
> B b = D(); //error
> B getB() { return D(); } //error
> };
> }
> struct D : B {};
> };
>
>
Well, yeah. D hasn't been defined at the point it's used.

Andrew



SG7 list run by sg7-owner@lists.isocpp.org

Older Archives on Google Groups