@daniel Ich verstehe vor allem nicht, warum Du Dich das bei diesem Beispiel im Bezug auf context_t überhaupt fragst. Was würd's Dir bringen wenn context_t standard layout wäre? Aber auch die Frage ob wegen einem defaulted destructor nun standard layout ist oder nicht ... hell, das ding ist abstrakt. Anyway. Die Regeln:
[class.prop]/3:
A class S is a standard-layout class if it:
(3.1) has no non-static data members of type non-standard-layout class (or array of such types) or reference,
(3.2) has no virtual functions 1) and no virtual base classes,
(3.3) has the same access control for all non-static data members,
(3.4) has no non-standard-layout base classes,
(3.5) has at most one base class subobject of any given type,
(3.6) has all non-static data members and bit-fields in the class and its base classes first declared in the same class, and
(3.7) has no element of the set M(S) of types as a base class, where for any type X, M(X) is defined as follows.105 [ Note: M(X) is the set of the types of all non-base-class subobjects that may be at a zero offset in X. — end note ]
(3.7.1) If X is a non-union class type with no (possibly inherited) non-static data members, the set M(X) is empty.
(3.7.2) If X is a non-union class type with a non-static data member of type X0 that is either of zero size or is the first non-static data member of X (where said member may be an anonymous union), the set M(X) consists of X0 and the elements of M(X0).
(3.7.3) If X is a union type, the set M(X) is the union of all M(Ui) and the set containing all Ui, where each Ui is the type of the ith non-static data member of X.
(3.7.4) If X is an array type with element type Xe, the set M(X) consists of Xe and the elements of M(Xe)
(3.7.5) If X is a non-class, non-array type, the set M(X) is empty.
1.) also nein, context_t ist natürlich nicht standart-layout. Aber wen kratzt es? Es wird nie-nicht Instanzen von context_t geben.