I\'m implementing a C++ expression templates library. I have set up a proper SubMatrixExpr class to collect elements within a matrix, enabling a syntax like
Another idea is to make the types of the arguments in the constructor char *, and then inside the constructor parse out the numbers from the :. For example,
A = B("3:4","8:end");
A = B(":","2");
This permits you to do more, like use the end keyword.