Skip to content

Commit

Permalink
Replace deprecated std::shared_ptr::unique
Browse files Browse the repository at this point in the history
Summary:
Replace deprecated [std::shared_ptr<T>::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
  • Loading branch information
yoney authored and facebook-github-bot committed Feb 5, 2025
1 parent 2d8e9fd commit 34d68f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ TEST(ScopedServerThreadTest, BindFailure) {
server->setAddress(address);
EXPECT_THROW(std::make_unique<ScopedServerThread>(server), exception);
// Make sure there wasn't a leak of the ThriftServer, (cf. t13139338).
EXPECT_TRUE(server.unique());
EXPECT_EQ(1, server.use_count());
}

0 comments on commit 34d68f3

Please sign in to comment.