wgtmac opened a new pull request, #482: URL: https://github.com/apache/paimon-cpp/pull/482
### Purpose Linked issue: N/A Replace `std::shared_ptr::unique()` with the equivalent `use_count()` checks in the real-time deduplication and key-offset index code. `unique()` is deprecated since C++17 and removed from libc++ in C++20. Although paimon-cpp itself currently builds as C++17, downstream projects can compile against its sources or headers in C++20 or newer. That currently fails because these two call sites use an API that is no longer available. The replacement has identical semantics and keeps the code compatible with C++17 and newer standards. ### Tests - Ran pre-commit on both changed files; all hooks passed, including clang-format, codespell, and cpplint. - Compiled both changed translation units with the parent project's C++23/libc++ flags after removing its temporary `_LIBCPP_ENABLE_CXX20_REMOVED_SHARED_PTR_UNIQUE` compatibility macro. Both compilations passed. - No behavior-specific UT/IT was added because this is a mechanical API replacement with unchanged ownership semantics. ### API and Format No public API, storage format, or protocol changes. ### Documentation No documentation changes are required; this fixes downstream C++20+ compatibility without changing user-facing behavior. ### Generative AI tooling Generated-by: OpenAI Codex 0.162.1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
