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
Cut backport of std::make_unique #1150
base: main
Are you sure you want to change the base?
Conversation
- Previously, folly supported compilers which did not implement `std::make_unique`, so there exists a backport implementation. - Now that folly only supports C++14-compliant compilers, remove the backport. - Fix call sites which were relying on unqualified `make_unique` being found in the folly namespace to explicitly use `std::make_unique`.
Ping @yfeldblum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Orvid has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Note that some parts of folly may be used with C++14 compilers but with C++11 standard libraries. |
I wasn't aware of that bit, but are there any parts of folly in particular which need to be C++11-standard-library compatible? Based on the unqualified Does the backport live in folly as an easy way for downstream projects that are still using C++11-standard-library to get it, despite most of folly library already using |
Well, compatible with the gcc49 implementation of the standard library in C++14 mode. This version has a partial but not a full implementation of the C++14 standard library spec. Note that the gcc49 implementation of the standard library in C++14 mode ships with Beyond |
Re this PR, there is code internally which still uses |
I grepped through Thrift and Eden and there weren't any explicit uses of Do you have any interest in fixing the internal code in a sweeping codemod or the like? |
Yes if it's easy, no if it's hard. :) I did just land one codemod internally, although more will be needed. Based on a quick search, it looks like React Native is using |
Here is a PR which replaces the usages of |
Summary: There is a mixed usage of `folly::make_unique` and `std::make_unique`. Soon, `folly::make_unique` may be removed (see [this PR](facebook/folly#1150)). Since `react-native` only supports C++14-compilers and later, switch to always using `std::make_unique`. ## Changelog [Internal] [Removed] - Replace folly::make_unique with std::make_unique Pull Request resolved: #26730 Test Plan: Running the existing test suite. No change in behavior is expected. Joshua Gross: buck install -r fb4a, make sure MP Home and forced teardown works okay on android Reviewed By: shergin Differential Revision: D18062400 Pulled By: JoshuaGross fbshipit-source-id: 978ca794c7e972db872a8dcc57c31bdec7451481
ping @yfeldblum since facebook/react-native#26730 landed |
std::make_unique
, so there exists a backport implementation.backport.
make_unique
beingfound in the folly namespace to explicitly use
std::make_unique
.