Avoid using std::enable_shared_from_this on older stdlibs that don't support weak_from_this()
Summary: Older standard libraries provide a `std::enable_shared_from_this` that doesn't have a `weak_from_this()` member, even when compiling in C++17 mode. Change the preprocessor conditional to account for this, and select the custom Folly implementation when the `std::` one is non-conforming. This change makes special accommodation for older MSVC versions, which fails to define the `__cpp_lib_enable_shared_from_this` feature test macro, but that provides a conforming `std::enable_shared_from_this` when compiling as C++17. Reviewed By: yfeldblum, ispeters Differential Revision: D25402425 fbshipit-source-id: c53b9fcebbf93c54342824dd56fd11eaa681abd1
Showing
Please register or sign in to comment