Anonymous said...
> volatileなlvalueへの、副作用を伴う操作において、
volatile な lvalue を通したオブジェクトへのアクセス自体が
「副作用」のひとつとして定義されているので、それが副作用を
伴わないことがあるかのような上記の記述はおかしいです。> C++0xでは、p7相当の文面が消えてしまっている。
本の虫: C++のvolatileについて
ドラフト N2914 だと p13 以降に移っているようです。
これのことかなぁ...
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2914.pdf の9ページあたり
Accessing an object designated by a volatile lvalue (3.10), modifying an object, calling a library I/O
function, or calling a function that does any of those operations are all side effects, which are changes in the
state of the execution environment. Evaluation of an expression (or a sub-expression) in general includes
both value computations (including determining the identity of an object for lvalue evaluation and fetching
a value previously assigned to an object for rvalue evaluation) and initiation of side effects. When a call to
a library I/O function returns or an access to a volatile object is evaluated the side effect is considered
complete, even though some external actions implied by the call (such as the I/O itself) or by the volatile
access may not have completed yet.