Skip to content

Conversation

@dunhor
Copy link
Member

@dunhor dunhor commented Jan 23, 2026

The original issue dates waaaaay back to issue #8 where str_concat was technically not two-phase-name-lookup clean since function overload sets only consider the functions that have been declared at the time of use, so all of the other str_raw_pointer overloads should not be considered for overloads. So this is an issue I've been wanting to tackle for some time.

When syncing with the OS, there was a conflict when calling str_concat with both std::filesystem::path and winrt::hstring since both are implicitly convertible to both std::wstring and wil::zwstring_view. Since I need to address those errors, I figured I might as well tackle both.

This changes it so that view_from_string delegates out to a class template that can be specialized, which doesn't have the same problems as function overloads. The negative consequence is that str_concat can no longer be used with types implicitly convertible to std::wstring, however upon further inspection I only found one reliance on this and it was for std::filesystem::path, and fixing that usage is goodness anyway since the implicit conversion makes a copy (calling .native() is better).

Fixes #8

@dunhor dunhor requested a review from jonwis January 23, 2026 00:43
@dunhor dunhor merged commit 1e9767a into master Jan 23, 2026
18 checks passed
@dunhor dunhor deleted the dunhor/view_from_string branch January 23, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

str_raw_ptr use is not /permissive- clean

3 participants