From: Christopher Dykes Date: Tue, 10 May 2016 00:15:22 +0000 (-0700) Subject: Fix detection of std::make_unique under MSVC X-Git-Tag: 2016.07.26~259 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d65a097e5978abb69522a193c351f818be368d06;p=folly.git 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 --- 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;