Modernize use of std::make_unique
[folly.git] / folly / executors / test / AsyncTest.cpp
index 4a7f0cf007979b0436eff22f5ba15ce0166cf4db..c1c87d46342c03db6b4aeae8219ec1c7d75be157 100644 (file)
@@ -18,6 +18,8 @@
 #include <folly/executors/ManualExecutor.h>
 #include <folly/portability/GTest.h>
 
+#include <memory>
+
 using namespace folly;
 
 TEST(AsyncFunc, manual_executor) {
@@ -45,7 +47,7 @@ TEST(AsyncFunc, void_lambda) {
 }
 
 TEST(AsyncFunc, moveonly_lambda) {
-  auto lambda = [] { return std::unique_ptr<int>(new int(42)); };
+  auto lambda = [] { return std::make_unique<int>(42); };
   auto future = async(lambda);
   EXPECT_EQ(42, *future.get());
 }