Skip defined checks in folly/Memory.h
authorYedidya Feldblum <yfeldblum@fb.com>
Sat, 7 Jan 2017 00:43:48 +0000 (16:43 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 7 Jan 2017 00:47:57 +0000 (16:47 -0800)
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

index 5e15d4a0a90ffafe84e1a67c8db82266c62d7ae5..d4978d92e9ee00ceca890b6620f6a316d45b2007 100644 (file)
@@ -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;