Lazy evaluation for matrix classes C++ example