6#ifndef GIMO_EXT_STD_UNIQUE_PTR_HPP
7#define GIMO_EXT_STD_UNIQUE_PTR_HPP
19template <
typename T,
typename Deleter>
20 requires(!std::is_array_v<T>)
23 static constexpr std::nullptr_t
null{};
25 using Pointer = std::unique_ptr<T, Deleter>;
28 static constexpr std::add_lvalue_reference_t<T>
value(
Pointer const& ptr)
noexcept(
noexcept(*ptr))
34 static constexpr std::add_rvalue_reference_t<T>
value(
Pointer&& ptr)
noexcept(
noexcept(*ptr))
36 return std::move(*ptr);
42 template <
typename Arg>
43 requires std::constructible_from<T, Arg&&>
47 return std::make_unique<T>(std::forward<Arg>(arg));
Definition AndThen.hpp:21
static constexpr std::add_rvalue_reference_t< T > value(Pointer &&ptr) noexcept(noexcept(*ptr))
Definition StdUniquePtr.hpp:34
std::unique_ptr< V > rebind_value
Definition StdUniquePtr.hpp:40
static constexpr std::nullptr_t null
Definition StdUniquePtr.hpp:23
std::unique_ptr< T, Deleter > Pointer
Definition StdUniquePtr.hpp:25
static constexpr std::add_lvalue_reference_t< T > value(Pointer const &ptr) noexcept(noexcept(*ptr))
Definition StdUniquePtr.hpp:28
static constexpr Pointer from_value(Arg &&arg)
Definition StdUniquePtr.hpp:45
The central customization point for the library.
Definition Common.hpp:102