// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Globalization_PhoneNumberFormatting_H #define WINRT_Windows_Globalization_PhoneNumberFormatting_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.Globalization.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Globalization.PhoneNumberFormatting.2.h" namespace winrt::impl { template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatter::Format(winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo const& number) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Format(*(void**)(&number), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Format(*(void**)(&number), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatter::Format(winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo const& number, winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormat const& numberFormat) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FormatWithOutputFormat(*(void**)(&number), static_cast(numberFormat), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FormatWithOutputFormat(*(void**)(&number), static_cast(numberFormat), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatter::FormatPartialString(param::hstring const& number) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FormatPartialString(*(void**)(&number), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FormatPartialString(*(void**)(&number), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatter::FormatString(param::hstring const& number) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FormatString(*(void**)(&number), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FormatString(*(void**)(&number), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatter::FormatStringWithLeftToRightMarkers(param::hstring const& number) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FormatStringWithLeftToRightMarkers(*(void**)(&number), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FormatStringWithLeftToRightMarkers(*(void**)(&number), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatterStatics::TryCreate(param::hstring const& regionCode, winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormatter& phoneNumber) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryCreate(*(void**)(®ionCode), impl::bind_out(phoneNumber))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryCreate(*(void**)(®ionCode), impl::bind_out(phoneNumber))); } } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatterStatics::GetCountryCodeForRegion(param::hstring const& regionCode) const { int32_t result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetCountryCodeForRegion(*(void**)(®ionCode), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCountryCodeForRegion(*(void**)(®ionCode), &result)); } return result; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatterStatics::GetNationalDirectDialingPrefixForRegion(param::hstring const& regionCode, bool stripNonDigit) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetNationalDirectDialingPrefixForRegion(*(void**)(®ionCode), stripNonDigit, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetNationalDirectDialingPrefixForRegion(*(void**)(®ionCode), stripNonDigit, &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberFormatterStatics::WrapWithLeftToRightMarkers(param::hstring const& number) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->WrapWithLeftToRightMarkers(*(void**)(&number), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WrapWithLeftToRightMarkers(*(void**)(&number), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::CountryCode() const { int32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CountryCode(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CountryCode(&value)); } return value; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::PhoneNumber() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PhoneNumber(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhoneNumber(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::GetLengthOfGeographicalAreaCode() const { int32_t result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetLengthOfGeographicalAreaCode(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetLengthOfGeographicalAreaCode(&result)); } return result; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::GetNationalSignificantNumber() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetNationalSignificantNumber(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetNationalSignificantNumber(&result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::GetLengthOfNationalDestinationCode() const { int32_t result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetLengthOfNationalDestinationCode(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetLengthOfNationalDestinationCode(&result)); } return result; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::PredictNumberKind() const { winrt::Windows::Globalization::PhoneNumberFormatting::PredictedPhoneNumberKind result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PredictNumberKind(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PredictNumberKind(reinterpret_cast(&result))); } return result; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::GetGeographicRegionCode() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetGeographicRegionCode(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetGeographicRegionCode(&result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfo::CheckNumberMatch(winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo const& otherNumber) const { winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberMatchResult result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CheckNumberMatch(*(void**)(&otherNumber), reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CheckNumberMatch(*(void**)(&otherNumber), reinterpret_cast(&result))); } return result; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfoFactory::Create(param::hstring const& number) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(*(void**)(&number), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(*(void**)(&number), &result)); } return winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfoStatics::TryParse(param::hstring const& input, winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo& phoneNumber) const { winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryParse(*(void**)(&input), impl::bind_out(phoneNumber), reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryParse(*(void**)(&input), impl::bind_out(phoneNumber), reinterpret_cast(&result))); } return result; } template auto consume_Windows_Globalization_PhoneNumberFormatting_IPhoneNumberInfoStatics::TryParse(param::hstring const& input, param::hstring const& regionCode, winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo& phoneNumber) const { winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryParseWithRegion(*(void**)(&input), *(void**)(®ionCode), impl::bind_out(phoneNumber), reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryParseWithRegion(*(void**)(&input), *(void**)(®ionCode), impl::bind_out(phoneNumber), reinterpret_cast(&result))); } return result; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Format(void* number, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Format(*reinterpret_cast(&number))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FormatWithOutputFormat(void* number, int32_t numberFormat, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Format(*reinterpret_cast(&number), *reinterpret_cast(&numberFormat))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FormatPartialString(void* number, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().FormatPartialString(*reinterpret_cast(&number))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FormatString(void* number, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().FormatString(*reinterpret_cast(&number))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FormatStringWithLeftToRightMarkers(void* number, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().FormatStringWithLeftToRightMarkers(*reinterpret_cast(&number))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryCreate(void* regionCode, void** phoneNumber) noexcept final try { clear_abi(phoneNumber); typename D::abi_guard guard(this->shim()); this->shim().TryCreate(*reinterpret_cast(®ionCode), *reinterpret_cast(phoneNumber)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCountryCodeForRegion(void* regionCode, int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetCountryCodeForRegion(*reinterpret_cast(®ionCode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetNationalDirectDialingPrefixForRegion(void* regionCode, bool stripNonDigit, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetNationalDirectDialingPrefixForRegion(*reinterpret_cast(®ionCode), stripNonDigit)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WrapWithLeftToRightMarkers(void* number, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().WrapWithLeftToRightMarkers(*reinterpret_cast(&number))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CountryCode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CountryCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhoneNumber(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhoneNumber()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetLengthOfGeographicalAreaCode(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetLengthOfGeographicalAreaCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetNationalSignificantNumber(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetNationalSignificantNumber()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetLengthOfNationalDestinationCode(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetLengthOfNationalDestinationCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PredictNumberKind(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().PredictNumberKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetGeographicRegionCode(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetGeographicRegionCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CheckNumberMatch(void* otherNumber, int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CheckNumberMatch(*reinterpret_cast(&otherNumber))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* number, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&number))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryParse(void* input, void** phoneNumber, int32_t* result) noexcept final try { clear_abi(phoneNumber); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryParse(*reinterpret_cast(&input), *reinterpret_cast(phoneNumber))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryParseWithRegion(void* input, void* regionCode, void** phoneNumber, int32_t* result) noexcept final try { clear_abi(phoneNumber); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryParse(*reinterpret_cast(&input), *reinterpret_cast(®ionCode), *reinterpret_cast(phoneNumber))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Globalization::PhoneNumberFormatting { inline PhoneNumberFormatter::PhoneNumberFormatter() : PhoneNumberFormatter(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto PhoneNumberFormatter::TryCreate(param::hstring const& regionCode, winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormatter& phoneNumber) { impl::call_factory([&](IPhoneNumberFormatterStatics const& f) { return f.TryCreate(regionCode, phoneNumber); }); } inline auto PhoneNumberFormatter::GetCountryCodeForRegion(param::hstring const& regionCode) { return impl::call_factory([&](IPhoneNumberFormatterStatics const& f) { return f.GetCountryCodeForRegion(regionCode); }); } inline auto PhoneNumberFormatter::GetNationalDirectDialingPrefixForRegion(param::hstring const& regionCode, bool stripNonDigit) { return impl::call_factory([&](IPhoneNumberFormatterStatics const& f) { return f.GetNationalDirectDialingPrefixForRegion(regionCode, stripNonDigit); }); } inline auto PhoneNumberFormatter::WrapWithLeftToRightMarkers(param::hstring const& number) { return impl::call_factory([&](IPhoneNumberFormatterStatics const& f) { return f.WrapWithLeftToRightMarkers(number); }); } inline PhoneNumberInfo::PhoneNumberInfo(param::hstring const& number) : PhoneNumberInfo(impl::call_factory([&](IPhoneNumberInfoFactory const& f) { return f.Create(number); })) { } inline auto PhoneNumberInfo::TryParse(param::hstring const& input, winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo& phoneNumber) { return impl::call_factory([&](IPhoneNumberInfoStatics const& f) { return f.TryParse(input, phoneNumber); }); } inline auto PhoneNumberInfo::TryParse(param::hstring const& input, param::hstring const& regionCode, winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo& phoneNumber) { return impl::call_factory([&](IPhoneNumberInfoStatics const& f) { return f.TryParse(input, regionCode, phoneNumber); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format template<> struct formatter : formatter {}; #endif } #endif