WIP: FloatOptional GCC build fix and more constexpr #1411

Closed
NickGerleman wants to merge 22 commits from NickGerleman-fix-gcc-floatoptional into main
NickGerleman commented 2023-10-03 16:22:57 -07:00 (Migrated from github.com)

GCC flags that is is not declared constexpr but that unwrapOrDefault() is. std::isnan is not constexpr until C++ 23 (because we cannot have nice things), so I made yoga::isUndefined() constexpr, using the same code std::isnan() boils down to. I then made FloatOptional depend on Comparison.h (instead of the other way around), so we can use it.

GCC flags that is is not declared `constexpr` but that `unwrapOrDefault()` is. `std::isnan` is not constexpr until C++ 23 (because we cannot have nice things), so I made `yoga::isUndefined()` constexpr, using the same code `std::isnan()` boils down to. I then made `FloatOptional` depend on `Comparison.h` (instead of the other way around), so we can use it.
facebook-github-bot commented 2023-10-03 18:21:38 -07:00 (Migrated from github.com)

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D49896837).
facebook-github-bot commented 2023-10-03 18:44:41 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D49896837](https://www.internalfb.com/diff/D49896837)
facebook-github-bot commented 2023-10-04 02:02:30 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D49896837](https://www.internalfb.com/diff/D49896837)

Pull request closed

Sign in to join this conversation.
No description provided.