In my case there is func:
// msg can be std::string, std::wstring, const char*, const wchar_t*, ...
template<typename StrType>
void Log(StrType msg) {
if std::string(msg) can be created from msg {
// do smth
}
if std::wstring(msg) can be created from msg {
// do smth
}
else {
// wrong argument
}
}
and i have to check if the std::string(wstring) can be created by 'msg' to do appropriate actions.