Skip to content

Remove redundant operator!= definitions in react-native-github#55746

Closed
NickGerleman wants to merge 1 commit intofacebook:mainfrom
NickGerleman:export-D94370249
Closed

Remove redundant operator!= definitions in react-native-github#55746
NickGerleman wants to merge 1 commit intofacebook:mainfrom
NickGerleman:export-D94370249

Conversation

@NickGerleman
Copy link
Contributor

Summary:
X-link: facebook/yoga#1892

C++20 automatically generates operator!= from operator==, making explicit operator!= definitions redundant. This removes all such redundant definitions across the React Native C++ codebase, including:

  • Simple negation patterns (return !(*this == rhs))
  • Explicit = default declarations that duplicate the compiler-generated behavior
  • Both member and free-function forms

Files in jsi/ were excluded as they are mirrored to a project that may not support C++20.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D94370249

Summary:
X-link: facebook/yoga#1892

C++20 automatically generates `operator!=` from `operator==`, making explicit `operator!=` definitions redundant. This removes all such redundant definitions across the React Native C++ codebase, including:

- Simple negation patterns (`return !(*this == rhs)`)
- Explicit `= default` declarations that duplicate the compiler-generated behavior
- Both member and free-function forms

Files in jsi/ were excluded as they are mirrored to a project that may not support C++20.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D94370249
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 25, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 25, 2026

@NickGerleman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94370249.

meta-codesync bot pushed a commit to facebook/yoga that referenced this pull request Feb 25, 2026
Summary:
X-link: facebook/react-native#55746

Pull Request resolved: #1892

C++20 automatically generates `operator!=` from `operator==`, making explicit `operator!=` definitions redundant. This removes all such redundant definitions across the React Native C++ codebase, including:

- Simple negation patterns (`return !(*this == rhs)`)
- Explicit `= default` declarations that duplicate the compiler-generated behavior
- Both member and free-function forms

Files in jsi/ were excluded as they are mirrored to a project that may not support C++20.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D94370249

fbshipit-source-id: f1c73d38a61ff9e780bd16a797e6ce71b1900d00
@meta-codesync meta-codesync bot closed this in f5a921f Feb 25, 2026
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @NickGerleman in f5a921f

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 25, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 25, 2026

This pull request has been merged in f5a921f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants