C++ interface, overloading and templates