Modernize use of std::make_unique
[folly.git] / folly / gen / test / ParallelTest.cpp
index b90202c64acc16100963858b9daf5172aa8507f1..358d86e69df57dc6eb4d381c682368b42822d2f5 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <array>
 #include <iostream>
+#include <memory>
 #include <vector>
 
 #include <glog/logging.h>
@@ -52,7 +53,7 @@ static auto isPrime = [](int n) {
 struct {
   template <class T>
   std::unique_ptr<T> operator()(T t) const {
-    return std::unique_ptr<T>(new T(std::move(t)));
+    return std::make_unique<T>(std::move(t));
   }
 } makeUnique;