4#ifndef QSHAREDHANDLE_P_H
5#define QSHAREDHANDLE_P_H
7#include <QtCore/private/quniquehandle_p.h>
8#include <QtCore/qtconfigmacros.h>
9#include <QtCore/qcompare.h>
52template <
typename SharedHandleTraits>
56 using Type =
typename SharedHandleTraits::Type;
60 return SharedHandleTraits::invalidValue();
66 return SharedHandleTraits::unref(handle);
73template <
typename HandleTraits>
80 static constexpr bool BaseResetIsNoexcept =
83 static constexpr bool RefIsNoexcept =
86 static constexpr bool BaseMoveIsNoexcept =
121 if (BaseClass::get() != o.get())
122 BaseClass::reset(HandleTraits::ref(o.get()));
128 BaseClass::operator=(std::forward<QSharedHandle>(o));
132 void reset(
typename HandleTraits::Type o,
136 BaseClass::reset(HandleTraits::ref(o));
153 BaseClass::swap(other);
157template <
typename Trait>
void swap(QSharedHandle< Trait > &lhs, QSharedHandle< Trait > &rhs) noexcept(noexcept(lhs.swap(rhs)))
void reset(typename HandleTraits::Type o, RefMode mode) noexcept(RefIsNoexcept &&BaseResetIsNoexcept)
void reset() noexcept(BaseResetIsNoexcept)
QSharedHandle & operator=(const QSharedHandle &o) noexcept(RefIsNoexcept &&BaseResetIsNoexcept)
QSharedHandle & operator=(QSharedHandle &&o) noexcept(BaseMoveIsNoexcept)
void swap(QSharedHandle &other) noexcept(noexcept(std::declval< BaseClass >().swap(other)))
QSharedHandle(const QSharedHandle &o)
QSharedHandle(typename HandleTraits::Type object, RefMode mode)
QSharedHandle(QSharedHandle &&) noexcept=default
static Type invalidValue() noexcept(noexcept(SharedHandleTraits::invalidValue()))
static bool close(Type handle) noexcept(noexcept(SharedHandleTraits::unref(handle)))