From d65a097e5978abb69522a193c351f818be368d06 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Mon, 9 May 2016 17:15:22 -0700 Subject: [PATCH] Fix detection of std::make_unique under MSVC Summary: MSVC doesn't define `__cplusplus` as a high enough value to trigger this, so add an explicit check for MSVC instead. Reviewed By: yfeldblum Differential Revision: D3271647 fbshipit-source-id: a1e5a5a7eb75dce066dfc7fae8b2086880dc4c3d --- folly/Memory.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/folly/Memory.h b/folly/Memory.h index 193d5062..a64ca4c8 100644 --- a/folly/Memory.h +++ b/folly/Memory.h @@ -37,8 +37,9 @@ namespace folly { * @author Xu Ning (xning@fb.com) */ -#if __cplusplus >= 201402L || \ - defined __cpp_lib_make_unique && __cpp_lib_make_unique >= 201304L +#if __cplusplus >= 201402L || \ + (defined __cpp_lib_make_unique && __cpp_lib_make_unique >= 201304L) || \ + (defined(_MSC_VER) && _MSC_VER >= 1900) /* using override */ using std::make_unique; -- 2.34.1