PIString/PIChar explicit, support char16_t

This commit is contained in:
2023-07-06 19:59:26 +03:00
parent 8ad2503c5a
commit 61f1a34c14
11 changed files with 132 additions and 73 deletions

View File

@@ -30,6 +30,7 @@
#ifdef QNX
typedef std::basic_string<wchar_t> wstring;
#endif
#include "piliterals.h"
#include "pistringlist.h"
@@ -117,12 +118,12 @@ inline std::istream & operator>>(std::istream & s, PIString & v) {
//! \relatesalso PIStringList \brief Output operator to std::ostream (cout)
inline std::ostream & operator<<(std::ostream & s, const PIStringList & v) {
s << PIChar("{");
s << PIChar('{');
for (uint i = 0; i < v.size(); ++i) {
s << PIChar("\"") << v[i] << PIChar("\"");
if (i < v.size() - 1) s << PIStringAscii(", ");
s << PIChar('"') << v[i] << PIChar('"');
if (i < v.size() - 1) s << ", "_a;
}
s << PIChar("}");
s << PIChar('}');
return s;
}