C++ - simplified overload