title: Iterator pointing to empty element of array
body: <p>I am just wondering whether in an array which has elements, but is not full of elements, e.g :</p>
  
  <pre><code>std::array&lt;int, 5&gt; foo;
  foo[0] = 4;
  foo[1] = 2;
  foo[2] = 3;
  </code></pre>
  
  <p>will foo.end() still point to the last element + 1 or will it point to the value at foo[3]?</p>
  
  <p>My context is that I am trying to find the minimum value location of an array which only sometimes has all the elements assigned. Some example code is below:</p>
  
  <pre><code>int min_loc = std::min_element(foo.begin(), foo.end()) - foo.begin();
  </code></pre>
  
  <p>Will this extract min_loc = 1? Or will it find 0 at the undefined elements in the array and assign those as the minimum location?</p>
  
  <p>If so, should I define the line above as:</p>
  
  <pre><code>int min_loc = std::min_element(foo.begin(), foo.end() - 2) - foo.begin();
  </code></pre>
  
  <p>Thanks in advance.</p>