This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new a8d060a8db1 [fix](compile) replace shared_ptr::unique() with std::shared_ptr::use_count() == 1 (#37688) a8d060a8db1 is described below commit a8d060a8db10f5aff4470540c7c43542e1021ef2 Author: Siyang Tang <82279870+tangsiyang2...@users.noreply.github.com> AuthorDate: Fri Jul 12 09:54:15 2024 +0800 [fix](compile) replace shared_ptr::unique() with std::shared_ptr::use_count() == 1 (#37688) ## Proposed changes `std::shared_ptr::unique` is supported until cpp20. It was disabled by default since llvm-18. [see](https://releases.llvm.org/18.1.0/projects/libcxx/docs/ReleaseNotes/18.html#id4). Therefore, replace it with std::shared_ptr::use_count() == 1 for better compability. (Or we should work with _LIBCPP_ENABLE_CXX20_REMOVED_SHARED_PTR_UNIQUE which is ungraceful.) --- be/src/io/cache/block_file_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/io/cache/block_file_cache.h b/be/src/io/cache/block_file_cache.h index 86ce1dc1196..e791d233894 100644 --- a/be/src/io/cache/block_file_cache.h +++ b/be/src/io/cache/block_file_cache.h @@ -289,7 +289,7 @@ private: /// Pointer to file block is always hold by the cache itself. /// Apart from pointer in cache, it can be hold by cache users, when they call /// getorSet(), but cache users always hold it via FileBlocksHolder. - bool releasable() const { return file_block.unique(); } + bool releasable() const { return file_block.use_count() == 1; } size_t size() const { return file_block->_block_range.size(); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org