Modernize use of std::make_unique
[folly.git] / folly / test / OptionalTest.cpp
index 990f1e17027d74f56b4b33c41b6ef86cea64e67f..b82f3164d1ec183d1c67baddb33efbc597fc5349 100644 (file)
@@ -223,10 +223,10 @@ TEST(Optional, Unique) {
 
   opt.clear();
   // empty->moved
-  opt = unique_ptr<int>(new int(6));
+  opt = std::make_unique<int>(6);
   EXPECT_EQ(6, **opt);
   // full->moved
-  opt = unique_ptr<int>(new int(7));
+  opt = std::make_unique<int>(7);
   EXPECT_EQ(7, **opt);
 
   // move it out by move construct