anonymous class type not used to declear any object と言われます。それで struct の定義の後に とりあえず s1, s2 と名前を つけたら、今度は、 member "struct quat::{anonymous union}::{anonymous} quat::{anonymous union}::s1" with constructor not allowed in union と言われました。 それでさらに union に u1 と定義してみましたが、同じエラーになりました。 これってどうすれば通りますか?
>>547 [17.4.3.1.2] Each name that contains a double underscore ("__") or begins with an underscore followed by an uppercase letter (lex.key) is reserved to the implementation for any use.
これか? [14.3.1] -2- A local type, a type with no linkage, an unnamed type or a type compounded from any of these types shall not be used as a template-argument for a template type-parameter.
えー、まずは、 T x = a; // copy-initialization T x(a); // direct-initialization と呼ぶそうだ。
[8.5 -14-] If the initialization is direct-initialization, or if it is copy-initialization where the cv-unqualified version of the source type is the same class as, or a derived class of, the class of the destination, constructors are considered.