title: Implementing Matlab's colon : operator in C++ expression templates class
body: <p>I'm implementing a C++ expression templates library. I have set up a proper <code>SubMatrixExpr</code> class to collect elements within a matrix, enabling a syntax like</p>
  
  <pre><code>B = SubMatrix(A,1,3,2,10);
  </code></pre>
  
  <p>which is equivalent to Matlab's</p>
  
  <pre><code>B = A(1:3,2:10);
  </code></pre>
  
  <p>Of course, Matlab's syntax is much more confortable than mine. So my question is</p>
  
  <p><em>Is there any possibility to set up Matlab's colon <code>:</code> operator in C++?</em></p>
  
  <p>Thank you very much in advance. </p>