From 34d68f315bb3754df1f62fe9df42050d32f73673 Mon Sep 17 00:00:00 2001 From: Alper Yoney Date: Wed, 5 Feb 2025 13:01:29 -0800 Subject: [PATCH] Replace deprecated std::shared_ptr::unique Summary: Replace deprecated [std::shared_ptr::unique](https://en.cppreference.com/w/cpp/memory/shared_ptr/unique) with `::use_count` Internal Fixes macos build Reviewed By: vitaut Differential Revision: D69187609 fbshipit-source-id: 42108414d508623046957494b316711b1b2a69a0 --- thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp b/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp index f00fe12496a..3df3e0aac2f 100644 --- a/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp +++ b/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp @@ -56,5 +56,5 @@ TEST(ScopedServerThreadTest, BindFailure) { server->setAddress(address); EXPECT_THROW(std::make_unique(server), exception); // Make sure there wasn't a leak of the ThriftServer, (cf. t13139338). - EXPECT_TRUE(server.unique()); + EXPECT_EQ(1, server.use_count()); }