So in my .h file I have
template <class T>
void getValue(T *val, int element, int index);
and then in my .cc file I have a function:
template <class T>
void RParser::getValue(T *val, int element, int index)
{
I also have it explicitly instantiated:
template void RParser::getValue<char>(char *val, int element, std::string subrecName);
template void RParser::getValue<long long>(long long *val, int element, std::string subrecName);
template void RParser::getValue<float>(float *val, int element, std::string subrecName);
...
this works but I would like to make a whole different function for std::string
I tried:
template <class std::string>
void RParser::getValue<std::string>(std::string * val, int element, int index)
{
but that didn't work.
Any suggestions would be greatly appreciated,
Thanks, Josh