Imagine to build a matrix [MxN] of generic type. Implement the classic [x, y] operator for accessing the element [x, y]. How would you implement it in C++?
here the code, where size can be either allocated at compile time or at run-time.
do you have any alternative solution? yes, boost::matrix is a valid one ;)