Commit 60db6d71 authored by Greg McGary's avatar Greg McGary Committed by Facebook Github Bot

Fix "use std::launder" predicate for Android NDKs

Summary:
The current predicate yields false positive for NDK r17. NDK r18 has launder without defining `__cpp_lib_launder`. NDK r19 finally gets it right by defining `__cpp_lib_launder`.

r17: launder? no,  `__cpp_lib_launder` undefined, `_LIBCPP_VERSION == 6000`
r18: launder? yes, `__cpp_lib_launder` undefined, `_LIBCPP_VERSION == 7000`
r19: launder? yes, `__cpp_lib_launder == 201606L`, `_LIBCPP_VERSION == 8000`

Reviewed By: yfeldblum

Differential Revision: D14098189

fbshipit-source-id: 315dba44c6474407a8f4c1d25c81fff057d5f7db
parent a04d119c
......@@ -28,7 +28,8 @@
// Note: libc++ 6+ adds std::launder but does not define __cpp_lib_launder
#if __cpp_lib_launder >= 201606 || (_MSC_VER && _HAS_LAUNDER) || \
(_LIBCPP_VERSION >= 6000 && __cplusplus >= 201703L)
((_LIBCPP_VERSION >= (__ANDROID__ ? 7000 : 6000)) && \
__cplusplus >= 201703L)
namespace folly {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment