One of the methods of the class Cmust return struct, containing a pair of integers and a new instance C. This may seem uncomfortable, but given the overall design, it makes a lot of sense (think of a class Waveformthat returns a range of itself as a copy indicating where the range starts and ends).
The problem is that this does not seem to be resolved. I can redesign my class to get around this problem, but can you explain to me why , from the point of view of the compiler, it is impossible to do
struct S {
struct S2 {
S s;
};
};
as Sis an incomplete type (this is a compiler error), and instead it is completely normal
struct C {
struct C1 {
C makeC() { return C(); }
};
};
Where is the significant difference?