diff --git a/change/@react-native-windows-codegen-f126650d-d5cd-4a67-a9dd-73f54e0498ef.json b/change/@react-native-windows-codegen-f126650d-d5cd-4a67-a9dd-73f54e0498ef.json new file mode 100644 index 00000000000..cc00d566126 --- /dev/null +++ b/change/@react-native-windows-codegen-f126650d-d5cd-4a67-a9dd-73f54e0498ef.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Fix build issue building component codegen using clang", + "packageName": "@react-native-windows/codegen", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-53667472-816f-4d36-b9f3-70b761dd1cf3.json b/change/react-native-windows-53667472-816f-4d36-b9f3-70b761dd1cf3.json new file mode 100644 index 00000000000..51dd42c1cb1 --- /dev/null +++ b/change/react-native-windows-53667472-816f-4d36-b9f3-70b761dd1cf3.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Fix tooltips in high dpi", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-9737fe71-c849-4e4f-a0ec-ba672ca94168.json b/change/react-native-windows-9737fe71-c849-4e4f-a0ec-ba672ca94168.json new file mode 100644 index 00000000000..6cfc6f58264 --- /dev/null +++ b/change/react-native-windows-9737fe71-c849-4e4f-a0ec-ba672ca94168.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Fix build issue building component codegen using clang", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-ca0880f1-4d40-4ab6-9c95-d843aade3939.json b/change/react-native-windows-ca0880f1-4d40-4ab6-9c95-d843aade3939.json new file mode 100644 index 00000000000..4890f3bbdc8 --- /dev/null +++ b/change/react-native-windows-ca0880f1-4d40-4ab6-9c95-d843aade3939.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Property updates switching between PlatformColors would no-op", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/@react-native-windows/codegen/src/generators/GenerateComponentWindows.ts b/packages/@react-native-windows/codegen/src/generators/GenerateComponentWindows.ts index 1bff2df1730..57cf4abd7cb 100644 --- a/packages/@react-native-windows/codegen/src/generators/GenerateComponentWindows.ts +++ b/packages/@react-native-windows/codegen/src/generators/GenerateComponentWindows.ts @@ -184,7 +184,7 @@ void Register::_COMPONENT_NAME_::NativeComponent( userData->UpdateEventEmitter(std::make_shared<::_COMPONENT_NAME_::EventEmitter>(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &Base::_COMPONENT_NAME_::::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &Base::_COMPONENT_NAME_::::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -192,7 +192,7 @@ void Register::_COMPONENT_NAME_::NativeComponent( }); } - if constexpr (&TUserData::UpdateState != &Base::_COMPONENT_NAME_::::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &Base::_COMPONENT_NAME_::::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -202,7 +202,7 @@ void Register::_COMPONENT_NAME_::NativeComponent( ::_REGISTER_CUSTOM_COMMAND_HANDLER_:: - if constexpr (&TUserData::MountChildComponentView != &Base::_COMPONENT_NAME_::::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &Base::_COMPONENT_NAME_::::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -210,7 +210,7 @@ void Register::_COMPONENT_NAME_::NativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &Base::_COMPONENT_NAME_::::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &Base::_COMPONENT_NAME_::::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -220,13 +220,13 @@ void Register::_COMPONENT_NAME_::NativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &Base::_COMPONENT_NAME_::::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &Base::_COMPONENT_NAME_::::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &Base::_COMPONENT_NAME_::::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &Base::_COMPONENT_NAME_::::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/Microsoft.ReactNative.Cxx/NativeModules.h b/vnext/Microsoft.ReactNative.Cxx/NativeModules.h index 41fb06bd8b7..0af0d8fbfc5 100644 --- a/vnext/Microsoft.ReactNative.Cxx/NativeModules.h +++ b/vnext/Microsoft.ReactNative.Cxx/NativeModules.h @@ -1360,6 +1360,15 @@ inline ReactModuleProvider MakeTurboModuleProvider() noexcept { return MakeModuleProvider(); } +// Clang does not allow a virtual function address to be a constexpr statement +#if !defined(CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS) +#if defined(__clang__) +#define CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS +#else +#define CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS constexpr +#endif +#endif + } // namespace winrt::Microsoft::ReactNative namespace React { diff --git a/vnext/Microsoft.ReactNative/Fabric/AbiViewProps.cpp b/vnext/Microsoft.ReactNative/Fabric/AbiViewProps.cpp index 02263560c72..3751d99862b 100644 --- a/vnext/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/AbiViewProps.cpp @@ -77,14 +77,12 @@ winrt::Microsoft::ReactNative::Color Color::ReadValue( switch (reader.ValueType()) { case JSValueType::Int64: { auto argb = reader.GetInt64(); - return winrt::make(facebook::react::Color{ - /*m_isDefined*/ true, - /*color*/ - {static_cast((argb >> 24) & 0xFF), - static_cast((argb >> 16) & 0xFF), - static_cast((argb >> 8) & 0xFF), - static_cast(argb & 0xFF)}, - {}}); + return winrt::make(facebook::react::Color{/*color*/ + {static_cast((argb >> 24) & 0xFF), + static_cast((argb >> 16) & 0xFF), + static_cast((argb >> 8) & 0xFF), + static_cast(argb & 0xFF)}, + {}}); } case JSValueType::Object: { std::vector platformColors; @@ -96,10 +94,10 @@ winrt::Microsoft::ReactNative::Color Color::ReadValue( SkipValue(reader); // Skip this property } } - return winrt::make(facebook::react::Color{/*m_isDefined*/ true, /*color*/ {}, std::move(platformColors)}); + return winrt::make(facebook::react::Color{/*color*/ {}, std::move(platformColors)}); } default: - return winrt::make(facebook::react::Color{/*m_isDefined*/ false, /*color*/ {0, 0, 0, 0}, {}}); + return winrt::make(facebook::react::Color{/*color*/ {0, 0, 0, 0}, {}}); } } diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp index d18b645cbec..672029efac0 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp @@ -183,7 +183,7 @@ void ComponentView::updateProps( updateShadowProps(oldViewProps, newViewProps); } if (oldViewProps.tooltip != newViewProps.tooltip) { - if (!m_tooltipTracked && newViewProps.tooltip) { + if (!m_tooltipTracked && newViewProps.tooltip && !newViewProps.tooltip->empty()) { TooltipService::GetCurrent(m_reactContext.Properties())->StartTracking(*this); m_tooltipTracked = true; } else if (m_tooltipTracked && !newViewProps.tooltip) { diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp index dde9878d10b..b33947457ca 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "TextDrawing.h" #include "dwmapi.h" @@ -49,7 +50,9 @@ facebook::react::AttributedStringBox CreateTooltipAttributedString(const std::st auto fragment = facebook::react::AttributedString::Fragment{}; fragment.string = tooltip; fragment.textAttributes.fontSize = tooltipFontSize; - attributedString.appendFragment(fragment); + fragment.textAttributes.fontSizeMultiplier = + static_cast(winrt::Windows::UI::ViewManagement::UISettings().TextScaleFactor()); + attributedString.appendFragment(std::move(fragment)); return facebook::react::AttributedStringBox{attributedString}; } @@ -231,14 +234,13 @@ void TooltipTracker::OnUnmounted( } void TooltipTracker::ShowTooltip(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { - auto viewCompView = view.as(); - - auto selfView = - winrt::get_self(viewCompView); - auto parentHwnd = selfView->GetHwndForParenting(); DestroyTimer(); if (!m_hwndTip) { + auto viewCompView = view.as(); + auto selfView = + winrt::get_self(viewCompView); + auto parentHwnd = selfView->GetHwndForParenting(); auto tooltipData = std::make_unique(view); tooltipData->attributedString = CreateTooltipAttributedString(*selfView->viewProps()->tooltip); @@ -256,37 +258,39 @@ void TooltipTracker::ShowTooltip(const winrt::Microsoft::ReactNative::ComponentV facebook::react::TextLayoutManager::GetTextLayout( tooltipData->attributedString, {} /*paragraphAttributes*/, layoutConstraints, tooltipData->textLayout); - DWRITE_TEXT_METRICS tm; - winrt::check_hresult(tooltipData->textLayout->GetMetrics(&tm)); - - tooltipData->width = - static_cast(tm.width + ((tooltipHorizontalPadding + tooltipHorizontalPadding) * scaleFactor)); - tooltipData->height = static_cast(tm.height + ((tooltipTopPadding + tooltipBottomPadding) * scaleFactor)); - - POINT pt = {static_cast(m_pos.X), static_cast(m_pos.Y)}; - ClientToScreen(parentHwnd, &pt); - - RegisterTooltipWndClass(); - HINSTANCE hInstance = GetModuleHandle(NULL); - m_hwndTip = CreateWindow( - c_tooltipWindowClassName, - L"Tooltip", - WS_POPUP, - pt.x - tooltipData->width / 2, - static_cast(pt.y - tooltipData->height - (toolTipPlacementMargin * scaleFactor)), - tooltipData->width, - tooltipData->height, - parentHwnd, - NULL, - hInstance, - tooltipData.get()); - - DWM_WINDOW_CORNER_PREFERENCE preference = DWMWCP_ROUNDSMALL; - UINT borderThickness = 0; - DwmSetWindowAttribute(m_hwndTip, DWMWA_WINDOW_CORNER_PREFERENCE, &preference, sizeof(preference)); - - tooltipData.release(); - AnimateWindow(m_hwndTip, toolTipAnimationTimeMs, AW_BLEND); + if (tooltipData->textLayout) { + DWRITE_TEXT_METRICS tm; + winrt::check_hresult(tooltipData->textLayout->GetMetrics(&tm)); + + tooltipData->width = + static_cast((tm.width + tooltipHorizontalPadding + tooltipHorizontalPadding) * scaleFactor); + tooltipData->height = static_cast((tm.height + tooltipTopPadding + tooltipBottomPadding) * scaleFactor); + + POINT pt = {static_cast(m_pos.X), static_cast(m_pos.Y)}; + ClientToScreen(parentHwnd, &pt); + + RegisterTooltipWndClass(); + HINSTANCE hInstance = GetModuleHandle(NULL); + m_hwndTip = CreateWindow( + c_tooltipWindowClassName, + L"Tooltip", + WS_POPUP, + pt.x - tooltipData->width / 2, + static_cast(pt.y - tooltipData->height - (toolTipPlacementMargin * scaleFactor)), + tooltipData->width, + tooltipData->height, + parentHwnd, + NULL, + hInstance, + tooltipData.get()); + + DWM_WINDOW_CORNER_PREFERENCE preference = DWMWCP_ROUNDSMALL; + UINT borderThickness = 0; + DwmSetWindowAttribute(m_hwndTip, DWMWA_WINDOW_CORNER_PREFERENCE, &preference, sizeof(preference)); + + tooltipData.release(); + AnimateWindow(m_hwndTip, toolTipAnimationTimeMs, AW_BLEND); + } } } diff --git a/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h b/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h index ce04a8b0f45..0560a7fc956 100644 --- a/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +++ b/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h @@ -12,13 +12,10 @@ namespace facebook::react { struct Color { bool operator==(const Color &otherColor) const { - return m_isUndefined && otherColor.m_isUndefined || - (m_isUndefined == otherColor.m_isUndefined && m_color == otherColor.m_color && - m_platformColor == otherColor.m_platformColor); + return m_color == otherColor.m_color && m_platformColor == otherColor.m_platformColor; } bool operator!=(const Color &otherColor) const { - return m_isUndefined != otherColor.m_isUndefined || m_color != otherColor.m_color || - m_platformColor != otherColor.m_platformColor; + return m_color != otherColor.m_color || m_platformColor != otherColor.m_platformColor; } winrt::Windows::UI::Color AsWindowsColor() const { @@ -36,13 +33,12 @@ struct Color { return RGB(m_color.R, m_color.G, m_color.B) | (m_color.A << 24); } - bool m_isUndefined; winrt::Windows::UI::Color m_color; std::vector m_platformColor; }; namespace HostPlatformColor { -static const facebook::react::Color UndefinedColor{true}; +static const facebook::react::Color UndefinedColor{{0, 0, 0, 0} /*Black*/, {} /*Empty PlatformColors*/}; } // namespace HostPlatformColor inline Color hostPlatformColorFromComponents(ColorComponents components) { @@ -53,7 +49,6 @@ inline Color hostPlatformColorFromComponents(ColorComponents components) { static_cast((int)round(components.green * ratio) & 0xff), static_cast((int)round(components.blue * ratio) & 0xff)}; return { - /* .m_isUndefined = */ false, /* .m_color = */ color, /* .m_platformColor = */ {}}; } diff --git a/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h b/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h index 627fc35e599..609583546c5 100644 --- a/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h +++ b/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h @@ -19,7 +19,6 @@ parsePlatformColor(const ContextContainer &contextContainer, int32_t surfaceId, auto map = (std::unordered_map>)value; if (map.find("windowsbrush") != map.end()) { facebook::react::Color color = { - /* .m_isDefined = */ true, /* .m_color = */ {}, /* .m_platformColor = */ std::move(map["windowsbrush"]), }; diff --git a/vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h b/vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h index 282e5a2d5fd..ab45ea7d689 100644 --- a/vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +++ b/vnext/codegen/react/components/rnwcore/ActivityIndicatorView.g.h @@ -147,7 +147,7 @@ void RegisterActivityIndicatorViewNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseActivityIndicatorView::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseActivityIndicatorView::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -155,7 +155,7 @@ void RegisterActivityIndicatorViewNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseActivityIndicatorView::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseActivityIndicatorView::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -163,7 +163,7 @@ void RegisterActivityIndicatorViewNativeComponent( }); } - if constexpr (&TUserData::MountChildComponentView != &BaseActivityIndicatorView::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseActivityIndicatorView::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -171,7 +171,7 @@ void RegisterActivityIndicatorViewNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseActivityIndicatorView::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseActivityIndicatorView::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -181,13 +181,13 @@ void RegisterActivityIndicatorViewNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseActivityIndicatorView::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseActivityIndicatorView::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseActivityIndicatorView::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseActivityIndicatorView::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h b/vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h index 64ff75203fb..87bd561edce 100644 --- a/vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +++ b/vnext/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h @@ -224,7 +224,7 @@ void RegisterAndroidDrawerLayoutNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseAndroidDrawerLayout::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidDrawerLayout::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -232,7 +232,7 @@ void RegisterAndroidDrawerLayoutNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseAndroidDrawerLayout::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidDrawerLayout::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -246,7 +246,7 @@ void RegisterAndroidDrawerLayoutNativeComponent( userData->HandleCommand(view, args); }); - if constexpr (&TUserData::MountChildComponentView != &BaseAndroidDrawerLayout::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidDrawerLayout::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -254,7 +254,7 @@ void RegisterAndroidDrawerLayoutNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseAndroidDrawerLayout::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidDrawerLayout::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -264,13 +264,13 @@ void RegisterAndroidDrawerLayoutNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseAndroidDrawerLayout::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidDrawerLayout::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseAndroidDrawerLayout::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidDrawerLayout::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h b/vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h index f0fa905730c..92b24ea2038 100644 --- a/vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +++ b/vnext/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h @@ -135,7 +135,7 @@ void RegisterAndroidHorizontalScrollContentViewNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseAndroidHorizontalScrollContentView::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidHorizontalScrollContentView::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -143,7 +143,7 @@ void RegisterAndroidHorizontalScrollContentViewNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseAndroidHorizontalScrollContentView::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidHorizontalScrollContentView::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -151,7 +151,7 @@ void RegisterAndroidHorizontalScrollContentViewNativeComponent( }); } - if constexpr (&TUserData::MountChildComponentView != &BaseAndroidHorizontalScrollContentView::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidHorizontalScrollContentView::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -159,7 +159,7 @@ void RegisterAndroidHorizontalScrollContentViewNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseAndroidHorizontalScrollContentView::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidHorizontalScrollContentView::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -169,13 +169,13 @@ void RegisterAndroidHorizontalScrollContentViewNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseAndroidHorizontalScrollContentView::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidHorizontalScrollContentView::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseAndroidHorizontalScrollContentView::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidHorizontalScrollContentView::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h b/vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h index 15854240ec3..6597f011d02 100644 --- a/vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h +++ b/vnext/codegen/react/components/rnwcore/AndroidProgressBar.g.h @@ -159,7 +159,7 @@ void RegisterAndroidProgressBarNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseAndroidProgressBar::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidProgressBar::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -167,7 +167,7 @@ void RegisterAndroidProgressBarNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseAndroidProgressBar::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidProgressBar::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -175,7 +175,7 @@ void RegisterAndroidProgressBarNativeComponent( }); } - if constexpr (&TUserData::MountChildComponentView != &BaseAndroidProgressBar::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidProgressBar::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -183,7 +183,7 @@ void RegisterAndroidProgressBarNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseAndroidProgressBar::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidProgressBar::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -193,13 +193,13 @@ void RegisterAndroidProgressBarNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseAndroidProgressBar::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidProgressBar::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseAndroidProgressBar::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidProgressBar::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h b/vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h index e48471f23d6..346fe4dc637 100644 --- a/vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +++ b/vnext/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h @@ -179,7 +179,7 @@ void RegisterAndroidSwipeRefreshLayoutNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseAndroidSwipeRefreshLayout::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidSwipeRefreshLayout::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -187,7 +187,7 @@ void RegisterAndroidSwipeRefreshLayoutNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseAndroidSwipeRefreshLayout::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidSwipeRefreshLayout::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -201,7 +201,7 @@ void RegisterAndroidSwipeRefreshLayoutNativeComponent( userData->HandleCommand(view, args); }); - if constexpr (&TUserData::MountChildComponentView != &BaseAndroidSwipeRefreshLayout::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidSwipeRefreshLayout::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -209,7 +209,7 @@ void RegisterAndroidSwipeRefreshLayoutNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseAndroidSwipeRefreshLayout::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidSwipeRefreshLayout::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -219,13 +219,13 @@ void RegisterAndroidSwipeRefreshLayoutNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseAndroidSwipeRefreshLayout::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidSwipeRefreshLayout::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseAndroidSwipeRefreshLayout::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidSwipeRefreshLayout::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h b/vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h index b367d2bb0f5..cbcb1a65e61 100644 --- a/vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h +++ b/vnext/codegen/react/components/rnwcore/AndroidSwitch.g.h @@ -196,7 +196,7 @@ void RegisterAndroidSwitchNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseAndroidSwitch::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseAndroidSwitch::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -204,7 +204,7 @@ void RegisterAndroidSwitchNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseAndroidSwitch::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseAndroidSwitch::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -218,7 +218,7 @@ void RegisterAndroidSwitchNativeComponent( userData->HandleCommand(view, args); }); - if constexpr (&TUserData::MountChildComponentView != &BaseAndroidSwitch::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseAndroidSwitch::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -226,7 +226,7 @@ void RegisterAndroidSwitchNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseAndroidSwitch::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseAndroidSwitch::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -236,13 +236,13 @@ void RegisterAndroidSwitchNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseAndroidSwitch::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseAndroidSwitch::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseAndroidSwitch::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseAndroidSwitch::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h b/vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h index 7d2c246120d..90765ce0405 100644 --- a/vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h +++ b/vnext/codegen/react/components/rnwcore/DebuggingOverlay.g.h @@ -163,7 +163,7 @@ void RegisterDebuggingOverlayNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseDebuggingOverlay::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseDebuggingOverlay::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -171,7 +171,7 @@ void RegisterDebuggingOverlayNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseDebuggingOverlay::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseDebuggingOverlay::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -185,7 +185,7 @@ void RegisterDebuggingOverlayNativeComponent( userData->HandleCommand(view, args); }); - if constexpr (&TUserData::MountChildComponentView != &BaseDebuggingOverlay::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseDebuggingOverlay::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -193,7 +193,7 @@ void RegisterDebuggingOverlayNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseDebuggingOverlay::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseDebuggingOverlay::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -203,13 +203,13 @@ void RegisterDebuggingOverlayNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseDebuggingOverlay::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseDebuggingOverlay::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseDebuggingOverlay::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseDebuggingOverlay::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/InputAccessory.g.h b/vnext/codegen/react/components/rnwcore/InputAccessory.g.h index ba9b07bc9d4..55155be8f64 100644 --- a/vnext/codegen/react/components/rnwcore/InputAccessory.g.h +++ b/vnext/codegen/react/components/rnwcore/InputAccessory.g.h @@ -135,7 +135,7 @@ void RegisterInputAccessoryNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseInputAccessory::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseInputAccessory::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -143,7 +143,7 @@ void RegisterInputAccessoryNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseInputAccessory::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseInputAccessory::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -151,7 +151,7 @@ void RegisterInputAccessoryNativeComponent( }); } - if constexpr (&TUserData::MountChildComponentView != &BaseInputAccessory::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseInputAccessory::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -159,7 +159,7 @@ void RegisterInputAccessoryNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseInputAccessory::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseInputAccessory::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -169,13 +169,13 @@ void RegisterInputAccessoryNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseInputAccessory::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseInputAccessory::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseInputAccessory::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseInputAccessory::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/ModalHostView.g.h b/vnext/codegen/react/components/rnwcore/ModalHostView.g.h index eb142c91fa4..2be1ae7b310 100644 --- a/vnext/codegen/react/components/rnwcore/ModalHostView.g.h +++ b/vnext/codegen/react/components/rnwcore/ModalHostView.g.h @@ -214,7 +214,7 @@ void RegisterModalHostViewNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseModalHostView::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseModalHostView::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -222,7 +222,7 @@ void RegisterModalHostViewNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseModalHostView::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseModalHostView::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -230,7 +230,7 @@ void RegisterModalHostViewNativeComponent( }); } - if constexpr (&TUserData::MountChildComponentView != &BaseModalHostView::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseModalHostView::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -238,7 +238,7 @@ void RegisterModalHostViewNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseModalHostView::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseModalHostView::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -248,13 +248,13 @@ void RegisterModalHostViewNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseModalHostView::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseModalHostView::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseModalHostView::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseModalHostView::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h b/vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h index ce7bd99dc91..e538097ea76 100644 --- a/vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h +++ b/vnext/codegen/react/components/rnwcore/PullToRefreshView.g.h @@ -175,7 +175,7 @@ void RegisterPullToRefreshViewNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BasePullToRefreshView::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BasePullToRefreshView::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -183,7 +183,7 @@ void RegisterPullToRefreshViewNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BasePullToRefreshView::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BasePullToRefreshView::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -197,7 +197,7 @@ void RegisterPullToRefreshViewNativeComponent( userData->HandleCommand(view, args); }); - if constexpr (&TUserData::MountChildComponentView != &BasePullToRefreshView::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BasePullToRefreshView::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -205,7 +205,7 @@ void RegisterPullToRefreshViewNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BasePullToRefreshView::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BasePullToRefreshView::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -215,13 +215,13 @@ void RegisterPullToRefreshViewNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BasePullToRefreshView::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BasePullToRefreshView::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BasePullToRefreshView::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BasePullToRefreshView::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/SafeAreaView.g.h b/vnext/codegen/react/components/rnwcore/SafeAreaView.g.h index 71570085328..abb9bcb3985 100644 --- a/vnext/codegen/react/components/rnwcore/SafeAreaView.g.h +++ b/vnext/codegen/react/components/rnwcore/SafeAreaView.g.h @@ -132,7 +132,7 @@ void RegisterSafeAreaViewNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseSafeAreaView::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseSafeAreaView::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -140,7 +140,7 @@ void RegisterSafeAreaViewNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseSafeAreaView::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseSafeAreaView::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -148,7 +148,7 @@ void RegisterSafeAreaViewNativeComponent( }); } - if constexpr (&TUserData::MountChildComponentView != &BaseSafeAreaView::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseSafeAreaView::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -156,7 +156,7 @@ void RegisterSafeAreaViewNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseSafeAreaView::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseSafeAreaView::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -166,13 +166,13 @@ void RegisterSafeAreaViewNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseSafeAreaView::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseSafeAreaView::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseSafeAreaView::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseSafeAreaView::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/Switch.g.h b/vnext/codegen/react/components/rnwcore/Switch.g.h index 4fe657d83ca..be2baaa7c3c 100644 --- a/vnext/codegen/react/components/rnwcore/Switch.g.h +++ b/vnext/codegen/react/components/rnwcore/Switch.g.h @@ -192,7 +192,7 @@ void RegisterSwitchNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseSwitch::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseSwitch::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -200,7 +200,7 @@ void RegisterSwitchNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseSwitch::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseSwitch::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -214,7 +214,7 @@ void RegisterSwitchNativeComponent( userData->HandleCommand(view, args); }); - if constexpr (&TUserData::MountChildComponentView != &BaseSwitch::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseSwitch::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -222,7 +222,7 @@ void RegisterSwitchNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseSwitch::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseSwitch::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -232,13 +232,13 @@ void RegisterSwitchNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseSwitch::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseSwitch::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseSwitch::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseSwitch::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view); diff --git a/vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h b/vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h index 9a72f246500..0088e2b2482 100644 --- a/vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +++ b/vnext/codegen/react/components/rnwcore/UnimplementedNativeView.g.h @@ -135,7 +135,7 @@ void RegisterUnimplementedNativeViewNativeComponent( userData->UpdateEventEmitter(std::make_shared(eventEmitter)); }); - if constexpr (&TUserData::FinalizeUpdate != &BaseUnimplementedNativeView::FinalizeUpdate) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseUnimplementedNativeView::FinalizeUpdate) { builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept { auto userData = view.UserData().as(); @@ -143,7 +143,7 @@ void RegisterUnimplementedNativeViewNativeComponent( }); } - if constexpr (&TUserData::UpdateState != &BaseUnimplementedNativeView::UpdateState) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseUnimplementedNativeView::UpdateState) { builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept { auto userData = view.UserData().as(); @@ -151,7 +151,7 @@ void RegisterUnimplementedNativeViewNativeComponent( }); } - if constexpr (&TUserData::MountChildComponentView != &BaseUnimplementedNativeView::MountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseUnimplementedNativeView::MountChildComponentView) { builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -159,7 +159,7 @@ void RegisterUnimplementedNativeViewNativeComponent( }); } - if constexpr (&TUserData::UnmountChildComponentView != &BaseUnimplementedNativeView::UnmountChildComponentView) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseUnimplementedNativeView::UnmountChildComponentView) { builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept { auto userData = view.UserData().as(); @@ -169,13 +169,13 @@ void RegisterUnimplementedNativeViewNativeComponent( compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = winrt::make_self(); - if constexpr (&TUserData::Initialize != &BaseUnimplementedNativeView::Initialize) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseUnimplementedNativeView::Initialize) { userData->Initialize(view); } view.UserData(*userData); }); - if constexpr (&TUserData::CreateVisual != &BaseUnimplementedNativeView::CreateVisual) { + if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseUnimplementedNativeView::CreateVisual) { compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept { auto userData = view.UserData().as(); return userData->CreateVisual(view);