try to fix clang warnings by not using class template specialization instead of function template specialization