Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-20 Thread Alexey Semenyuk
On Mon, 19 Sep 2022 20:46:12 GMT, Julian Waters wrote: >> I'm the author of these comments and basically the entire source file. >> >> You are right, it will work without the additional overloads. However the >> null pointers will be ignored (tested with G++ 7.4.0), but this is minor, >> proba

Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-19 Thread Alexander Matveev
On Fri, 9 Sep 2022 13:38:14 GMT, Julian Waters wrote: > tstrings::any() has an overload for std::wstring (if required) but is missing > the corresponding operator overload for std::string, leaving only the > templated one as a fallback, which will expand into a std::wostringstream << > std::st

Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-19 Thread Julian Waters
On Mon, 19 Sep 2022 19:17:06 GMT, Alexey Semenyuk wrote: >> I deliberately left those 2 out since the comments accompanying them seem to >> suggest that they're Windows specific overloads that are there for different >> reasons (As opposed to the one this PR is aimed at, which takes in a regula

Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-19 Thread Alexey Semenyuk
On Mon, 19 Sep 2022 18:06:51 GMT, Julian Waters wrote: >> src/jdk.jpackage/share/native/common/tstrings.h line 363: >> >>> 361: return *this; >>> 362: } >>> 363: >> >> I guess you also need >> >> any& operator << (LPSTR v) { >> data << (v ? fromUtf8(v)

Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-19 Thread Alexey Semenyuk
On Fri, 9 Sep 2022 13:38:14 GMT, Julian Waters wrote: > tstrings::any() has an overload for std::wstring (if required) but is missing > the corresponding operator overload for std::string, leaving only the > templated one as a fallback, which will expand into a std::wostringstream << > std::st

Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-19 Thread Julian Waters
On Mon, 19 Sep 2022 17:27:29 GMT, Alexey Semenyuk wrote: >> tstrings::any() has an overload for std::wstring (if required) but is >> missing the corresponding operator overload for std::string, leaving only >> the templated one as a fallback, which will expand into a >> std::wostringstream <<

Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-19 Thread Alexey Semenyuk
On Fri, 9 Sep 2022 13:38:14 GMT, Julian Waters wrote: > tstrings::any() has an overload for std::wstring (if required) but is missing > the corresponding operator overload for std::string, leaving only the > templated one as a fallback, which will expand into a std::wostringstream << > std::st

Re: RFR: 8293595: tstrings::any() is missing an overload

2022-09-17 Thread Julian Waters
On Fri, 9 Sep 2022 13:38:14 GMT, Julian Waters wrote: > tstrings::any() has an overload for std::wstring (if required) but is missing > the corresponding operator overload for std::string, leaving only the > templated one as a fallback, which will expand into a std::wostringstream << > std::st

RFR: 8293595: tstrings::any() is missing an overload

2022-09-09 Thread Julian Waters
tstrings::any() has an overload for std::wstring (if required) but is missing the corresponding operator overload for std::string, leaving only the templated one as a fallback, which will expand into a std::wostringstream << std::string operation. This isn't particularly safe on Windows, conside