From f6e21697867e932704b94cff464faad12f31bb08 Mon Sep 17 00:00:00 2001 From: Nick Lefever Date: Fri, 13 Nov 2026 09:21:01 -0800 Subject: [PATCH] Export `LayoutResults::operator==` Summary: X-link: https://github.com/react/react-native/pull/59997 `yoga::Node` is exported from the Yoga library and hands out its `LayoutResults` through `getLayout()`, but `LayoutResults::operator==` is defined out of line and not exported. Code outside Yoga that compares two layout results fails to link wherever Yoga is built as a shared library with hidden visibility. Mark the operator `YG_EXPORT` so React Native can compare a node's layout results with those of the node it replaces. Changelog: [Internal] Reviewed By: javache Differential Revision: D131770771 --- yoga/node/LayoutResults.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yoga/node/LayoutResults.h b/yoga/node/LayoutResults.h index 54960a4436..d427aea038 100644 --- a/yoga/node/LayoutResults.h +++ b/yoga/node/LayoutResults.h @@ -9,6 +9,7 @@ #include +#include #include #include #include @@ -136,7 +137,7 @@ struct LayoutResults { padding_[yoga::to_underlying(physicalEdge)] = dimension; } - bool operator==(LayoutResults layout) const; + YG_EXPORT bool operator==(LayoutResults layout) const; private: Direction direction_ : bitCount() = Direction::Inherit;