std::make_unique -> folly::make_unique
authorJon Maltiel Swenson <jmswen@fb.com>
Tue, 24 May 2016 22:41:25 +0000 (15:41 -0700)
committerFacebook Github Bot 9 <facebook-github-bot-9-bot@fb.com>
Tue, 24 May 2016 22:53:25 +0000 (15:53 -0700)
Summary:
We should use folly::make_unique instead of std::make_unique in order to support
compilers without support for C++14.

Reviewed By: pavlo-fb

Differential Revision: D3343288

fbshipit-source-id: 9150af752e57988962a7580851ffa32086c669d7

folly/experimental/TestUtil.cpp
folly/experimental/test/TestUtilTest.cpp

index 362ed1580d6135c5ad8a0a1bf0d3e7f4ca6fe2d2..7087c5684377280d922317f1ea5f84e0fc7ae3e5 100644 (file)
@@ -26,6 +26,7 @@
 #include <folly/Exception.h>
 #include <folly/File.h>
 #include <folly/FileUtil.h>
+#include <folly/Memory.h>
 #include <folly/String.h>
 #include <folly/portability/Environment.h>
 
@@ -100,7 +101,7 @@ TemporaryDirectory::TemporaryDirectory(
     fs::path dir,
     Scope scope)
     : scope_(scope),
-      path_(std::make_unique<fs::path>(
+      path_(folly::make_unique<fs::path>(
           generateUniquePath(std::move(dir), namePrefix))) {
   fs::create_directory(path());
 }
index d8480b1d731dc1f0e181bc1e8b59c9415478a0fb..a84e017c0b67d4c50164364eaa535a3335cb1f7d 100644 (file)
@@ -117,7 +117,7 @@ TEST(TemporaryDirectory, SafelyMove) {
     expectTempdirExists(d);
     expectTempdirExists(d2);
 
-    dir = std::make_unique<TemporaryDirectory>(std::move(d));
+    dir = folly::make_unique<TemporaryDirectory>(std::move(d));
     dir2 = std::move(d2);
   }