string str = convert<string>(123,BASE_16);
where convert has the following prototype :
template<typename ReturnType, typename InputType>
ReturnType convert(const InputType, const size_t base);
or this way :
2)
string str;
convert(123,str,BASE_16);
where the convert function has the following prototype :
template<typename ReturnType, typename InputType>
void convert(const InputType src,ReturnType& dest, const size_t base);
I feel like the second one looks better.