8293595: tstrings::any() is missing an overload
Reviewed-by: asemenyuk, almatvee
This commit is contained in:
parent
0f28cb06ab
commit
bb422f5c14
@ -356,6 +356,11 @@ namespace tstrings {
|
|||||||
data << fromUtf8(msg);
|
data << fromUtf8(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
any& operator << (const std::string& msg) {
|
||||||
|
data << fromUtf8(msg);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef TSTRINGS_WITH_WCHAR
|
#ifdef TSTRINGS_WITH_WCHAR
|
||||||
any(std::wstring::const_pointer msg) {
|
any(std::wstring::const_pointer msg) {
|
||||||
data << msg;
|
data << msg;
|
||||||
@ -365,22 +370,22 @@ namespace tstrings {
|
|||||||
data << msg;
|
data << msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
any& operator << (const std::wstring& v) {
|
any& operator << (const std::wstring& msg) {
|
||||||
data << v;
|
data << msg;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// need this specialization instead std::wstring::pointer,
|
// need this specialization instead std::wstring::pointer,
|
||||||
// otherwise LPWSTR is handled as abstract pointer (void*)
|
// otherwise LPWSTR is handled as abstract pointer (void*)
|
||||||
any& operator << (LPWSTR v) {
|
any& operator << (LPWSTR msg) {
|
||||||
data << (v ? v : L"NULL");
|
data << (msg ? msg : L"NULL");
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// need this specialization instead std::wstring::const_pointer,
|
// need this specialization instead std::wstring::const_pointer,
|
||||||
// otherwise LPCWSTR is handled as abstract pointer (const void*)
|
// otherwise LPCWSTR is handled as abstract pointer (const void*)
|
||||||
any& operator << (LPCWSTR v) {
|
any& operator << (LPCWSTR msg) {
|
||||||
data << (v ? v : L"NULL");
|
data << (msg ? msg : L"NULL");
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user