Skip to content

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

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

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

Conversation

@NickGerleman
Copy link
Contributor

Summary:
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:
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
@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yoga-website Ready Ready Preview, Comment Feb 25, 2026 4:09pm

Request Review

@meta-cla meta-cla bot added the CLA Signed 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.

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 25, 2026
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-codesync meta-codesync bot closed this in 369f715 Feb 25, 2026
meta-codesync bot pushed a commit to facebook/react-native that referenced this pull request Feb 25, 2026
Summary:
Pull Request resolved: #55746

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

fbshipit-source-id: f1c73d38a61ff9e780bd16a797e6ce71b1900d00
@meta-codesync
Copy link

meta-codesync bot commented Feb 25, 2026

This pull request has been merged in 369f715.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants