title: Why does std::span overload the function call operator for indexing?
body: <p>Edit: this overload has been removed from the standard now, it seems.</p>
  
  <p>From <a href="https://en.cppreference.com/w/cpp/container/span/operator_at" rel="nofollow noreferrer">cppreference</a>:</p>
  
  <blockquote>
  <pre><code>constexpr reference operator[](index_type idx) const;
  constexpr reference operator()(index_type idx) const;
  </code></pre>
    
    <p>Returns a reference to the <code>idx</code>-th element of the sequence. The
    behavior is undefined if <code>idx</code> is out of range (i.e., if it is less
    than zero or greater than or equal to <code>size()</code>).</p>
  </blockquote>
  
  <p>It makes sense to overload <code>operator[]</code> for indexing, as a span represents an object that can refer to a contiguous sequence of objects, but why is <code>operator()</code>, the <a href="http://en.cppreference.com/w/cpp/language/operator_other#Built-in_function_call_operator" rel="nofollow noreferrer">function call operator</a>, also overloaded for the same purpose? I don't believe there's anything similar to this in the standard library.</p>