>>55-56 21.3.2 にこんなん書いてあるよ。 "The class template basic_string conforms to the requirements of a Sequence, as specified in (23.1.1). Additionally, because the iterators supported by basic_string are random access iterators (24.1.5), basic_string conforms to the the requirements of a Reversible Container, as specified in (23.1)."
13 The implicitly-defined copy assignment operator for class X performs memberwise assignment of its subobjects. The direct base classes of X are assigned first, in the order of their declaration in the base-specifierlist, and then the immediate nonstatic data members of X are assigned, in the order in which they were declared in the class definition. Each subobject is assigned in the manner appropriate to its type: ? if the subobject is of class type, the copy assignment operator for the class is used (as if by explicit qualification; that is, ignoring any possible virtual overriding functions in more derived classes); ? if the subobject is an array, each element is assigned, in the manner appropriate to the element type;
ちょっと違うだろ。 case A: int n; ... case B: ... みたいなものならまだ良いけど case A: std::string str; ... case B: だと、Bの時にstrがスコープにあるのに、コンストラクタが呼ばれない という話のはず。 変数のスコープが、switchの外側にあるとき(>>201)は出ないと思う。
10.4.6 > Member functions can be called from a constructor (or destructor) of an abstract class; the effect of making a virtual call > (10.3) to a pure virtual function directly or indirectly for the object being created (or destroyed) from such a constructor > (or destructor) is undefined.