-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FloatOptional GCC build fix and more constexpr (#39796)
Summary: X-link: facebook/yoga#1411 Pull Request resolved: #39796 X-link: facebook/yoga#1414 GCC flags that `isUndefined()` 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. Note that the use of the `std::floating_point` concept here requires the libc++ bump in the previous diff in the stack. Reviewed By: yungsters Differential Revision: D49896837 fbshipit-source-id: 61e2bbbfedecffd007a12d42d998e43d3cf5119c
- Loading branch information
1 parent
e9ecd35
commit 5e5019c
Showing
3 changed files
with
38 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters