Detect `std::launder` in libc++ 6 (and Xcode 10) (#948)
Summary: Fixes #947. >libc++ 6+ (and Xcode 10's libc++, which seems to be based on it) adds std::launder, but does not define the __cpp_lib_launder feature-test macro. As a result, folly's lang/Launder.h concludes std::launder is missing and defines its own implementation. Since std::launder does actually exist, ADL causes 'ambiguous call' errors whenever a standard library type like std::pair is laundered within the folly namespace. (This breaks compilation of folly's futures, for example, and I believe it will cause compilation issues anywhere else F14Map is used, since it launders std::pair in its F14Policy.) Pull Request resolved: https://github.com/facebook/folly/pull/948 Reviewed By: ot Differential Revision: D10287027 Pulled By: yfeldblum fbshipit-source-id: be3469fe6855d2af266e1b6a62968770e8cfd76f
Showing
Please register or sign in to comment