ClickHouse/base/base/isSharedPtrUnique.h
Nikita Mikhaylov 7ff447de68 Modify the code for build with new libcxx
(cherry picked from commit c896f0bf677bcc948d988cf83b2108e9f7cd761d)
2024-07-09 20:16:43 +00:00

10 lines
147 B
C++

#pragma once
#include <memory>
template <typename T>
bool isSharedPtrUnique(const std::shared_ptr<T> & ptr)
{
return ptr.use_count() == 1;
}