24 #include <type_traits> 27 #include <boost/noncopyable.hpp> 28 #include <glog/logging.h> 100 explicit operator bool()
const {
101 return dd_ !=
nullptr;
113 template <
typename AliasType>
115 template <
typename CopyAliasType>
119 template <
typename...
Args>
121 return {
new AliasType(std::forward<Args>(args)...)};
129 typename CopyAliasType,
130 typename =
typename std::enable_if<
136 typename CopyAliasType,
137 typename =
typename std::enable_if<
148 typename CopyAliasType,
150 typename =
typename std::enable_if<
159 typename CopyAliasType,
160 typename =
typename std::enable_if<
172 void reset(AliasType* dd =
nullptr) {
176 AliasType*
get()
const {
188 explicit operator bool()
const {
189 return DestructorGuard::operator bool();
233 return left.
get() == right.
get();
238 return left.
get() != right.
get();
243 return left.
get() ==
nullptr;
248 return nullptr == right.
get();
253 return left.
get() !=
nullptr;
258 return nullptr != right.
get();
261 template <
typename LeftAliasType,
typename RightAliasType>
265 return left.
get() == right.
get();
267 template <
typename LeftAliasType,
typename RightAliasType>
271 return left.
get() != right.
get();
273 template <
typename LeftAliasType>
277 return left.
get() ==
nullptr;
279 template <
typename RightAliasType>
283 return nullptr == right.
get();
285 template <
typename LeftAliasType>
289 return left.
get() !=
nullptr;
291 template <
typename RightAliasType>
295 return nullptr != right.
get();
IntrusivePtr & operator=(AliasType *dd)
AliasType * operator->() const
void reset(AliasType *dd=nullptr)
IntrusivePtr(const IntrusivePtr< CopyAliasType > ©)
static IntrusivePtr< AliasType > make(Args &&...args)
IntrusivePtr(const std::unique_ptr< CopyAliasType, Deleter > ©)
constexpr detail::Map< Move > move
uint32_t getDestructorGuardCount() const
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
DestructorGuard & operator=(DestructorGuard dg) noexcept
IntrusivePtr & operator=(IntrusivePtr< CopyAliasType > copy) noexcept
bool operator!=(const Unexpected< Error > &lhs, const Unexpected< Error > &rhs)
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
AliasType & operator*() const
IntrusivePtr(AliasType *dd)
DelayedDestructionBase * dd_
virtual ~DelayedDestructionBase()=default
DestructorGuard(DelayedDestructionBase *dd)
static const char *const value
DestructorGuard & operator=(DelayedDestructionBase *dd)
DelayedDestructionBase * get() const
T exchange(T &obj, U &&new_value)
IntrusivePtr(IntrusivePtr< CopyAliasType > &©)
bool operator==(const Unexpected< Error > &lhs, const Unexpected< Error > &rhs)
void swap(SwapTrackingAlloc< T > &, SwapTrackingAlloc< T > &)
DestructorGuard(const DestructorGuard &dg)
DestructorGuard(DestructorGuard &&dg) noexcept
virtual void onDelayedDestroy(bool delayed)=0