13 template<
class T,
class... constructor_args_t>
18 std::make_unique<T>(std::forward<constructor_args_t>(args)...));
21 template<
class T,
class deleter_t,
class... constructor_args_t>
26 std::unique_ptr<T, deleter_t>(
new T(std::forward<constructor_args_t>(args)...), std::move(deleter)));
32 template<
class T,
class... args_t>
33 template<
class U,
class other_deleter_t>
34 requires std::constructible_from<std::unique_ptr<T, args_t...>, std::unique_ptr<U, other_deleter_t>&&>
35 smart_ptr_ref_adapter<std::unique_ptr, T, args_t...>::smart_ptr_ref_adapter(
36 smart_ptr_ref_adapter<std::unique_ptr, U, other_deleter_t>&& other) noexcept
37 : super(
static_cast<std::unique_ptr<U, other_deleter_t>&&
>(other))
41 template<
class T,
class... args_t>
42 void smart_ptr_ref_adapter<std::unique_ptr, T, args_t...>::reset(smart_ptr_ref_adapter other) noexcept
44 *
this = std::move(other);
47 template<
class T,
class... args_t>
48 template<
class... constructor_args_t>
49 smart_ptr_ref_adapter<std::unique_ptr, T, args_t...>::smart_ptr_ref_adapter(private_token, constructor_args_t&&... args)
50 : super(std::forward<constructor_args_t>(args)...)
unique_ref< T, deleter_t > make_unique_ref_with_deleter(deleter_t deleter, constructor_args_t &&... args)
Make a unique ref with a custom deleter.
unique_ref< T > make_unique_ref(constructor_args_t &&... args)
Make a unique ref (same as std::make_unique but for qx::unique_ref)