Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking: Use C++ 20 #39437

Closed
wants to merge 2 commits into from
Closed

Conversation

NickGerleman
Copy link
Contributor

Summary:
Have been running into places where C++ 20 makes life easier for use like std::bit_cast (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously, but n - 1 is going to be a better long term place than n - 2. I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 10 (releaseed 3.5 years ago), and VS 16.11 (released 2 years ago).

Differential Revision: D49261607

@facebook-github-bot facebook-github-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 Sep 14, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49261607

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously, but n - 1 is going to be a better long term place than n - 2. I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 10 (releaseed 3.5 years ago), and VS 16.11 (released 2 years ago).

Differential Revision: D49261607
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382


Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: D49261607
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49261607

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382


Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: D49261607
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49261607

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382


Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: D49261607
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49261607

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 14, 2023
Summary:

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: D49261607
@analysis-bot
Copy link

analysis-bot commented Sep 14, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,341,872 -20
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,580,721 +8
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 0ab8b40
Branch: main

@popejrh19
Copy link

popejrh19 commented Sep 14, 2023 via email

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: f6eddcfdc9e21ffaf76a72b61fff319388342ded
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: f6bd52448286bd2b4fc9f64c5a421eba89c9c99b
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: c212923ddcf3ca6bfe0d8e7f0534f1e60618dc2d
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 883e00e99417bd1cc666d1419ebaaf1d063f9368
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 2f9fe1c4d68754fc4a61661a759f1960dd3e7d0d
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: acca21d531a8b494de3cde1fe7dd33fd1fedb367
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 6d0fd2478e2dcf38f8b96a5fae6e1f4ae3bbd18b
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 222cb335809d269b8fb1ca7eab82ce5f9975ac12
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 14, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 7c12bfafc67c2c3506f81f37c11ba06352a6ea7e
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 15, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 7d7a2c135424b45460f0ebed3004cd63e02e9faf
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49261607

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 18, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 42a7a255f270ad8aec8b7442c91d332af3da542a
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 18, 2023
Summary:
X-link: facebook/yoga#1382

Pull Request resolved: facebook#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

Accounting for bundled STL, and using `bit_cast` as a reference feature, I think this means we require one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

On mobile, the Clang 14 requirement translates to needing one of:
1. NDK 25 (~1 year old)
1. XCode 14.2.0 (~1 year old)

https://en.cppreference.com/w/cpp/compiler_support/20

I think it is likely everything will be buildable for a while under Clang 10 (released 3.5 years ago), GCC 11 (releaseed 3.5 years ago), and .

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: c78accc3c021da151d84304538841dd4d8d461fd
@github-actions
Copy link

Warnings
⚠️ One hour and a half have passed and the E2E jobs haven't finished yet.

Generated by 🚫 dangerJS against 4ce8089

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: 4aa33314fcdca7a3a21daa703759795bad3ce0d0
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: f0feec868d215041c3180fcf0185034305a1d480
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: f37240d6e5f5863c22236e78e32d68cf904a4cdd
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: 553dd8a4aedc415d015d8b25fc75d6a903a1dea7
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: beea637fe2d8fc4cf4d7479bad7abbb26b02267a
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: 9fdba4e83eef765e78d9e2709fc40db72e685315
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: 7c062c37b827fee1affe45faa9ee7dd49c631b75
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: aa90694ac3ad8ada6da77f0f03e36a61e3e443c8
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Differential Revision: https://www.internalfb.com/diff/D49261607?entry_point=27

fbshipit-source-id: 0425eca90a39938d023da4f4b51578e5b84880b1
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: b55a230dfdffad52e3d88bd97fea03cdaadd96e6
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Differential Revision: https://www.internalfb.com/diff/D49261607?entry_point=27

fbshipit-source-id: 6daab45bff10a3331f9e02736a55a403f9ca63a1
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: acb5d8122dfd6b9e6701d897cfad7ffed270f4ab
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: a00302dfe80040890c5a12cd45d520a54ab6eb44
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: eb877710264df13863d7244c10c71b89e9d0185f
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: cf0dbe92edb9886f39daeaf81158c940640bd542
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: db0d8ce113fe3c0411eb813d29de0decfa3bad45
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Differential Revision: https://www.internalfb.com/diff/D49261607?entry_point=27

fbshipit-source-id: 861cf8850f5d10794fc0db33cdd1307fbb3852b3
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: 1dc1d58005074d7355c4ae03669e75f7832e1efd
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

bypass-github-export-checks

Changelog: [Internal]

Differential Revision: https://internalfb.com/D49261607

fbshipit-source-id: 660e510e884c89c0b12e5432dbb19bbb968928b4
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: facebook#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

bypass-github-export-checks

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: 38301204d56b7bc8410c2dda9c291da1b8d61ec1
facebook-github-bot pushed a commit to facebook/yoga that referenced this pull request Sep 19, 2023
Summary:
Pull Request resolved: #1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

bypass-github-export-checks

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: ceb06eac20dfe93352d7b796d6847a7314069cf3
facebook-github-bot pushed a commit to facebook/litho that referenced this pull request Sep 19, 2023
Summary:
X-link: facebook/yoga#1382

X-link: facebook/react-native#39437

Have been running into places where C++ 20 makes life easier for use like `std::bit_cast` (that one is easy to polyfill), in-class member initializer support for bitfields, designated initializers, defaulted comparison operator, concepts instead of SFINAE, and probably more.

Our other infra is in the process of making this jump, or already has. This tests it out everywhere, across the various reference builds, to see if we have any issues.

This is a bit more aggressive than I had previously communicated, but n - 1 is going to be a better long term place than n - 2.

If we wanted to use `std::bit_cast` we would need one of:
1. GCC 11+ (~2.5 years old)
1. Clang 14 (~2.5 years old)
1. VS 16.11 (~2 years old)

For mobile this means:
1. NDK 26 (still in Beta 😭)
1. XCode 14.3.0 (~6 months old)

https://en.cppreference.com/w/cpp/compiler_support/20

That isn't quite doable yet, but we can start taking advantage of language features in the meantime. More of these will be supported in older toolchains.

Anyone needing support for older C++ versions can lag behind on more recent changes. E.g. Yoga 2.0 supports C++ 14.

bypass-github-export-checks

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49261607

fbshipit-source-id: ceb06eac20dfe93352d7b796d6847a7314069cf3
@github-actions
Copy link

This pull request was successfully merged by @NickGerleman in 3275b60.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Sep 19, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3275b60.

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. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants