What does std::find return if element not found
<p>As per documentation, <code>std::find</code> returns </p>

<blockquote>
  <p>last</p>
</blockquote>

<p>if no element is found. What does that mean? Does it return an iterator pointing to the last element in the container? Or does it return an iterator pointing to <code>.end()</code>, i.e. pointing outside the container?
The following code prints <code>0</code>, which is not an element of the container. So, I guess <code>std::find</code> returns an iterator outside the container. Could you please confirm?</p>

<pre><code>int main()
{
    vector&lt;int&gt; vec = {1, 2,3, 1000, 4, 5};
    auto itr = std::find(vec.begin(), vec.end(), 456);
    cout &lt;&lt; *itr;
}
</code></pre>