Modernize use of std::make_unique
[folly.git] / folly / test / ThreadLocalTest.cpp
index 6be3f22834671377c21fcba3f27d3ce83e5e2510..7163701b9164c8847b7f217bb495f99869c45c93 100644 (file)
@@ -29,6 +29,7 @@
 #include <climits>
 #include <condition_variable>
 #include <map>
+#include <memory>
 #include <mutex>
 #include <set>
 #include <thread>
@@ -269,7 +270,7 @@ TEST(ThreadLocal, InterleavedDestructors) {
     {
       std::lock_guard<std::mutex> g(lock);
       thIterPrev = thIter;
-      w.reset(new ThreadLocal<Widget>());
+      w = std::make_unique<ThreadLocal<Widget>>();
       ++wVersion;
     }
     while (true) {