From: Yedidya Feldblum Date: Sat, 7 Jan 2017 00:43:48 +0000 (-0800) Subject: Skip defined checks in folly/Memory.h X-Git-Tag: v2017.03.06.00~125 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c5e6d87b2adc858072885ec321968c973372a7ec;p=folly.git 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 --- 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;