Strategy Pattern implemented in C++