API design in C++