C++相談室 part88
レス数が950を超えています。1000を超えると書き込みができなくなります。
0968デフォルトの名無しさん
2011/05/02(月) 09:04:22.61If the initializer expression is an rvalue, with T2 a class type, and “cv1 T1” is
reference-compatible with “cv2 T2,” the reference is bound in one of the
following ways (the choice is implementation-defined): <--- コピーされるかどうかは実装依存
- The reference is bound to the object represented by the rvalue (see 3.10) or
to a sub-object within that object.
- A temporary of type “cv1 T2” is created, and a constructor is called to
copy the entire rvalue object into the temporary. The reference is bound to
the temporary or to a sub-object within the temporary.
The constructor that would be used to make the copy shall be callable whether
or not the copy is actually done. <--- コピーされようがされまいが、コピー可能でなければならない
エラーになるのはこのためとおもわれ
レス数が950を超えています。1000を超えると書き込みができなくなります。