Page MenuHomeFreeBSD

atf: Switch from std::auto_ptr<> to std::unique_ptr<>
ClosedPublic

Authored by jhb on Apr 11 2025, 6:00 PM.
Tags
None
Referenced Files
F132288504: D49789.id153538.diff
Wed, Oct 15, 1:36 PM
Unknown Object (File)
Fri, Oct 3, 2:32 PM
Unknown Object (File)
Fri, Oct 3, 9:31 AM
Unknown Object (File)
Fri, Sep 26, 9:36 AM
Unknown Object (File)
Sep 15 2025, 6:47 PM
Unknown Object (File)
Aug 26 2025, 10:37 PM
Unknown Object (File)
Aug 14 2025, 10:16 PM
Unknown Object (File)
Aug 8 2025, 11:49 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63467
Build 60351: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Apr 11 2025, 6:00 PM
This revision is now accepted and ready to land.Apr 16 2025, 12:00 PM

Upstream has apparently fixed this differently using shared_ptr (not sure why, that seems wasteful and inefficient given there weren't any pointer assignments).

Upstream has apparently fixed this differently using shared_ptr

Huh, the only results for shared_ptr I see upstream are in NEWS claiming

Replace auto_ptr with std::shared_ptr (fixes modern C++ compliance).

But it's actually unique_ptr as in your review, from https://github.com/freebsd/atf/commit/f053ab687f6e27aa264f599ecbfc5ef27ad4e2d3
Pull request to update NEWS submitted: https://github.com/freebsd/atf/pull/103

Hah, cute. Ok then, that means I can still merge this and it will just fall out when doing our next vendor import.