In the C++ 20 Standard (Draft 4860) there is written (11.4 Class members)
5 A member shall not be declared twice in the member-specification, except that
(5.1) — a nested class or member class template can be declared and then later defined, and
It can be understood as either the enclosed class has one declaration of the nested class or it contains at first a declaration without the definition of the nested class and then a declaration that is at the same time its definition.
However this declaration
struct A
    struct B;
    struct B {};
    struct B;
compiles successfully by most of compilers.
Is that declaration of the structure A with the nested structure B valid or should the quote be rewritten such a way that it would be clear that such a declaration is ill-formed?
With best regards
(Vlad from Moscow)
You can meet me at or or