- C++相談室 part119 [転載禁止]©2ch.net
542 :デフォルトの名無しさん[sage]:2015/09/27(日) 15:00:57.98 ID:zsE9aaJl - >>541
なにも問題ない 参照のスコープまで生き延びる 確か規格の8.5.3か12.2あたり
|
- C++相談室 part119 [転載禁止]©2ch.net
543 :デフォルトの名無しさん[sage]:2015/09/27(日) 15:13:07.68 ID:zsE9aaJl - 12.2一時オブジェクトの段落5か
The temporary to which the reference is bound or the temporary that is the complete object of a subobject to which the reference is bound persists for the lifetime of the reference except: 去年Visual C++は Sub && s = Full{}.sub; の寿命が延びないバグがあったのでバグ報告しといたけど、直ったようだ
|
- C++相談室 part119 [転載禁止]©2ch.net
545 :デフォルトの名無しさん[sage]:2015/09/27(日) 15:15:29.74 ID:zsE9aaJl - >>544
右辺値を受け取ってるんだから右辺値参照なのは当たり前だろう
|