https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96645
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> It looks like the nested class DataWithStruct::A isn't considered complete
> until after DataWithStruct is complete, but I'm not sure why that is.
Maybe the note in [class.mem.general]/7 is relevant:
A complete-class context of a nested class is also a complete-class context
of any enclosing class, if the nested class is defined within the
member-specification of the enclosing class.
We can't determine if A is constructible until we parse the initializer for
DataWithStruct::A::number. And according to the above, we can't parse this
initializer until DataWithStruct is complete.
Looks like PR81359 is closely related.