C++相談室 part119 [転載禁止]©5ch.io
■ このスレッドは過去ログ倉庫に格納されています
0421デフォルトの名無しさん
2015/09/22(火) 16:59:35.71ID:FVa42+rI配列じゃないオブジェクトへのポインタ演算のルールは要素数 1 の配列といっしょ。
5.7 [expr.add] p4
> For the purposes of these operators, a pointer to a nonarray object
> behaves the same as a pointer to the first element of an array of length
> one with the type of the object as its element type.
■ このスレッドは過去ログ倉庫に格納されています