C++ - add template specializations for setDefault()