From c5e6d87b2adc858072885ec321968c973372a7ec Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Fri, 6 Jan 2017 16:43:48 -0800 Subject: [PATCH] Skip defined checks in folly/Memory.h Summary: [Folly] Skip `defined` checks in `folly/Memory.h`. Undefined symbols, when evaluated by the preprocessor in preprocessor integer contexts, evaluate to `0`. That works for these checks. Reviewed By: ericniebler Differential Revision: D4385026 fbshipit-source-id: 3162f8b83431ebab2de53f9ba202e7ea8c339210 --- folly/Memory.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/folly/Memory.h b/folly/Memory.h index 5e15d4a0..d4978d92 100644 --- a/folly/Memory.h +++ b/folly/Memory.h @@ -36,10 +36,8 @@ namespace folly { * @author Xu Ning (xning@fb.com) */ -#if __cplusplus >= 201402L || \ - (defined __cpp_lib_make_unique && __cpp_lib_make_unique >= 201304L) || \ - (defined __ANDROID__ && __cplusplus >= 201300L) || \ - (defined(_MSC_VER) && _MSC_VER >= 1900) +#if __cplusplus >= 201402L || __cpp_lib_make_unique >= 201304L || \ + (__ANDROID__ && __cplusplus >= 201300L) || _MSC_VER >= 1900 /* using override */ using std::make_unique; -- 2.34.1