diff --git a/cppwinrt/component_writers.h b/cppwinrt/component_writers.h index cb748917d..8d855ebe1 100644 --- a/cppwinrt/component_writers.h +++ b/cppwinrt/component_writers.h @@ -149,9 +149,9 @@ bool __stdcall %_can_unload_now() noexcept return true; } -void* __stdcall %_get_activation_factory([[maybe_unused]] std::wstring_view const& name) +void* __stdcall %_get_activation_factory([[maybe_unused]] winrt::hstring const& name) { - auto requal = [](std::wstring_view const& left, std::wstring_view const& right) noexcept + auto requal = [](winrt::hstring const& left, winrt::hstring const& right) noexcept { return std::equal(left.rbegin(), left.rend(), right.rbegin(), right.rend()); }; @@ -189,7 +189,7 @@ int32_t __stdcall WINRT_CanUnloadNow() noexcept int32_t __stdcall WINRT_GetActivationFactory(void* classId, void** factory) noexcept try { - std::wstring_view const name{ *reinterpret_cast(&classId) }; + winrt::hstring& const name{ *reinterpret_cast(&classId) }; *factory = %_get_activation_factory(name); if (*factory) diff --git a/strings/base_string_input.h b/strings/base_string_input.h index 8cfea212b..d8a847761 100644 --- a/strings/base_string_input.h +++ b/strings/base_string_input.h @@ -18,11 +18,6 @@ WINRT_EXPORT namespace winrt::param { } - hstring(std::wstring_view const& value) noexcept - { - create_string_reference(value.data(), value.size()); - } - hstring(std::wstring const& value) noexcept { create_string_reference(value.data(), value.size());