title: Using std::sort() without prefix "std" and also without "using namespace std;" compiles successfully
body: <p>As <code>sort()</code> is defined in <code>namespace std</code> it must always be used as <code>std::sort</code>.But the following code compiles correctly even without <code>std</code>.</p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;algorithm&gt;
  
  int main()
  {
      std::vector&lt;int&gt; nums = {4,3,1,7,2,0};
      sort(nums.begin(),nums.end());
  }
  </code></pre>
  
  <p><a href="http://ideone.com/IUSuBQ">ideone.com</a></p>
  
  <p>But this code doesn't.</p>
  
  <pre><code>#include &lt;array&gt;
  #include &lt;algorithm&gt;
  
  int main()
  {
  
      std::array&lt;int,5&gt; nums = {4,1,8,9,6};
      sort(nums.begin(),nums.end());
  }
  </code></pre>
  
  <p>Using <code>gcc 4.8.4</code> with <code>-std=c++11</code> flag enabled.</p>
  
  <p>From both these code snippets it is clear that <code>std::vector</code> has something to do with this.But I can't figure it out.</p>