title: why do subscript operators C++ often comes in pair?
body: <p><a href="http://www.parashift.com/c++-faq/multidim-arrays3.html" rel="nofollow">C++ FAQ</a> is defining a template container <code>Matrix</code> to avoid tricky <code>new</code> <code>delete</code> code. Tutorial says that subscript operators often come in pairs ? Why is it so ?</p>
  
  <pre><code>T&amp;       operator() (unsigned i, unsigned j); 
  T const&amp; operator() (unsigned i, unsigned j) const;
  </code></pre>
  
  <p>Why is it so ?</p>
  
  <p>This is also called : const-overloading. </p>
  
  <p>FAQ gives clues. Do you have additional comments ?</p>
  
  <p>In particular, should <code>mutate()</code> observe certain rules to be used safely on const objects only ?</p>