From: Jon Maltiel Swenson <jmswen@fb.com>
Date: Wed, 8 Mar 2017 17:41:26 +0000 (-0800)
Subject: std::make_unique -> folly::make_unique for older platforms
X-Git-Tag: v2017.03.13.00~14
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d1b51192a67b2cb12f25b4456b554b66e6eb7eff;p=folly.git

std::make_unique -> folly::make_unique for older platforms

Summary: Title.

Reviewed By: yfeldblum

Differential Revision: D4674125

fbshipit-source-id: 71ad38d7a52ab1c27fcc7ff14d130978b0ece382
---

diff --git a/folly/io/async/EventBase.cpp b/folly/io/async/EventBase.cpp
index 7e043f4c..062ec2d3 100644
--- a/folly/io/async/EventBase.cpp
+++ b/folly/io/async/EventBase.cpp
@@ -21,6 +21,7 @@
 #include <folly/io/async/EventBase.h>
 #include <folly/io/async/VirtualEventBase.h>
 
+#include <folly/Memory.h>
 #include <folly/ThreadName.h>
 #include <folly/io/async/NotificationQueue.h>
 #include <folly/portability/Unistd.h>
@@ -748,7 +749,7 @@ const char* EventBase::getLibeventMethod() { return event_get_method(); }
 
 VirtualEventBase& EventBase::getVirtualEventBase() {
   folly::call_once(virtualEventBaseInitFlag_, [&] {
-    virtualEventBase_ = std::make_unique<VirtualEventBase>(*this);
+    virtualEventBase_ = folly::make_unique<VirtualEventBase>(*this);
   });
 
   return *virtualEventBase_;
diff --git a/folly/io/async/test/EventBaseTest.cpp b/folly/io/async/test/EventBaseTest.cpp
index 5528dc3e..6724bae2 100644
--- a/folly/io/async/test/EventBaseTest.cpp
+++ b/folly/io/async/test/EventBaseTest.cpp
@@ -1835,7 +1835,7 @@ TEST(EventBaseTest, LoopKeepAliveAtomic) {
   size_t done{0};
 
   for (size_t i = 0; i < kNumThreads; ++i) {
-    batons.emplace_back(std::make_unique<Baton<>>());
+    batons.emplace_back(folly::make_unique<Baton<>>());
   }
 
   for (size_t i = 0; i < kNumThreads; ++i) {