Is there any difference with undefined behaviour between iterator and scalar object? : <p><a href="http://en.cppreference.com/w/cpp/language/eval_order" rel="noreferrer">The topic</a> about evaluation order says that following code leads to undefined behavior until C++17:</p>

<pre><code>a[i] = i++;
</code></pre>

<p>This happens due to unspecified order while evaluating left and right parts of the assignment expression. </p>

<p>C++14 standard 1.9/15 says: </p>

<blockquote>
  <p>If a side effect on a scalar object is unsequenced relative to either another side effect on the same scalar object or a value computation using the value of the same scalar object, and they are not potentially concurrent (1.10), the behavior is undefined.</p>
</blockquote>

<p>But what if we use <code>std::vector</code> and its <code>iterator</code> object instead of scalar object <code>i</code>?</p>

<pre><code>std::vector&lt;int&gt; v = {1, 2};
auto it = v.begin();
*it = *it++;   // UB?
</code></pre>

<p>Is there undefined behaviour (until c++17) or not?</p>
