Template Function rcppsw::to_string

Function Documentation

template<typename T, typename std::enable_if<!mpl::is_detected<detail::to_str_type, T>::value, int>::type = 0>
std::string rcppsw::to_string(const T &obj)

For T where std::to_string(T) works let the stdandard library to the conversion.

For T where std::to_string(T) does not work, if T defines a to_str() method, then it can still use rcppsw::to_string().