title: No matching function for call to 'std::advance' error
body: <p>I have the following code which <code>Xcode</code> says it doesn't recognised the signature for <code>std::advance</code>:</p>
  
  <pre><code>template&lt;typename Container&gt; const typename Container::value_type&amp;
  getNthElement(const Container&amp; container, size_t n) {
      auto nElem = advance(container.begin(), n);
      return *nElem;
  }
  </code></pre>
  
  <p>The compiler doesn't support <code>C++14</code> so I can't use <code>cbegin(container)</code>. Why is this solution wrong ?</p>