args
args copied to clipboard
std::wstring support?
On Win32 the default main accepts TCHAR
which could be WCHAR
.
Maybe you could add typedefs for all std::string
types:
#ifdef WITH_UNICODE
typedef std::wstring STRING;
typedef std::wstring::npos STRING_NPOS;
typedef std::wstring::size_type STRING_SIZE_TYPE;
#else
typedef std::string STRING;
typedef std::string::npos STRING_NPOS;
typedef std::string::size_type STRING_SIZE_TYPE;
#endif
wchar support would be quite handy
It's not a bad idea. It would possibly be better to take in the string type as a template, to also allow for other string types (particularly utf-8 types), but that could add more noise and template complexity. I'm not against a typedef like this, though it is backwards-incompatible.
Is that a "I'm looking into it" or a "I'm waiting for contribution"? ;D
More of a "I was looking into it, but the templates got ugly and unmaintainable, and I never returned to it". I'd be more than happy to accept a reasonable pull request, otherwise I can get to it sometime in the next few weeks when I have a free evening. I'd probably just stick to the typedef style.
Good to hear :)
ping :)
ping 😃