Skip to content

Instantly share code, notes, and snippets.

@stryku
Last active July 12, 2017 20:56
Show Gist options
  • Select an option

  • Save stryku/a395b10cfd340e2552a1cbeee056b036 to your computer and use it in GitHub Desktop.

Select an option

Save stryku/a395b10cfd340e2552a1cbeee056b036 to your computer and use it in GitHub Desktop.
template <typename T>
std::enable_if_t<std::is_integral_v<T>::value ||
std::is_unsigned_v<T>::value ||
std::is_floating_point_v<T>::value,
std::string>
toString(const T& value)
{
return std::to_string(value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment