Skip to content

Instantly share code, notes, and snippets.

@nlguillemot
Created June 2, 2015 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nlguillemot/78f9f31055b45cb7c55d to your computer and use it in GitHub Desktop.
Save nlguillemot/78f9f31055b45cb7c55d to your computer and use it in GitHub Desktop.
to_string based on TCHAR
namespace detail
{
template<class T>
std::string to_tstring(CHAR, const T& x) { return std::to_string(x); }
template<class T>
std::wstring to_tstring(WCHAR, const T& x) { return std::to_wstring(x); }
}
template<class T>
auto to_tstring(const T& x)
{
return ::detail::to_tstring(TCHAR(), x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment