C++20 removes the `std::shared_ptr::unique()` API with the suggestion to use the `use_count()` method instead. Note that we are using the unique/use_count APIs in a way that is generally cautioned against though our usage patterns may be fine. See: https://en.cppreference.com/w/cpp/memory/shared_ptr/unique Example errors: https://godbolt.org/z/1j3zzd1hP Ref #125881