move template specializations to cpp