i'm implementing c++ expression templates library. have set proper submatrixexpr class collect elements within matrix, enabling syntax like b = submatrix(a,1,3,2,10); which equivalent matlab's b = a(1:3,2:10); of course, matlab's syntax more confortable mine. question is is there possibility set matlab's colon : operator in c++? thank in advance. short answer: no. colon not valid c++ operator, cannot overloaded. , if could, still not possible achiev need easily, because surely have precedence on comma operator, make expression in lines of a((1:3),(2:10)) , , allowed overload operators if 1 of operands user defined type (which not case here). so other operator in place, not looks this. what can do: overload operator() matrix class, sensible arguments. enable write b = a(1,3,2,10); , if define operator()(int,int, int, int); my preferred solution operator() taking either 2 initializer_list s in c++11 or 2 std::array<int,2> . forme...