20namespace seqan3::detail
29concept boxable = std::copy_constructible<t> && std::is_object_v<t>;
41 constexpr copyable_wrapper(copyable_wrapper
const &) =
default;
42 constexpr copyable_wrapper(copyable_wrapper &&) =
default;
43 constexpr ~copyable_wrapper() =
default;
48 constexpr copyable_wrapper() noexcept(
std::is_nothrow_default_constructible_v<t>)
49 requires
std::default_initializable<t>
54 constexpr copyable_wrapper &
55 operator=(copyable_wrapper
const & other)
noexcept(std::is_nothrow_copy_constructible_v<t>)
56 requires (!std::copyable<t>)
69 constexpr copyable_wrapper &
operator=(copyable_wrapper && other)
noexcept(std::is_nothrow_move_constructible_v<t>)
70 requires (!std::movable<t>)
75 this->
emplace(std::move(*other));
93 template <
typename... args_t>
94 requires std::invocable<t, args_t...>
95 constexpr decltype(
auto)
operator()(args_t... args)
noexcept(std::is_nothrow_invocable_v<t, args_t...>)
101 template <
typename... args_t>
102 requires std::invocable<t, args_t...>
103 constexpr decltype(
auto)
operator()(args_t... args)
const noexcept(std::is_nothrow_invocable_v<t, args_t...>)
117 requires std::copyable<t>
118 || (std::is_nothrow_move_constructible_v<t> && std::is_nothrow_copy_constructible_v<t>)
120 && std::default_initializable<t>
122 class copyable_wrapper<t>
129 constexpr copyable_wrapper()
130 requires std::default_initializable<t>
133 constexpr copyable_wrapper(copyable_wrapper const &) = default;
134 constexpr copyable_wrapper(copyable_wrapper &&) = default;
135 constexpr ~copyable_wrapper() = default;
138 constexpr copyable_wrapper & operator=(copyable_wrapper const &)
139 requires
std::copyable<t>
143 constexpr copyable_wrapper & operator=(copyable_wrapper const & other) noexcept
155 constexpr copyable_wrapper & operator=(copyable_wrapper &&)
156 requires std::copyable<t>
160 constexpr copyable_wrapper & operator=(copyable_wrapper && other) noexcept
172 constexpr explicit copyable_wrapper(t
const & other)
noexcept(std::is_nothrow_copy_constructible_v<t>) :
177 constexpr explicit copyable_wrapper(t && other)
noexcept(std::is_nothrow_move_constructible_v<t>) :
178 value{std::move(other)}
182 template <
typename... args_t>
183 requires std::constructible_from<t, args_t...>
186 value{std::forward<args_t>(args)...}
190 constexpr bool has_value() const noexcept
196 constexpr t & operator*() noexcept
202 constexpr t
const & operator*() const noexcept
208 constexpr t * operator->() noexcept
214 constexpr t
const * operator->() const noexcept
229 template <
typename... args_t>
230 requires std::invocable<t, args_t...>
231 constexpr decltype(
auto)
operator()(args_t... args)
noexcept(std::is_nothrow_invocable_v<t, args_t...>)
233 return std::invoke(value, std::forward<args_t>(args)...);
237 template <
typename... args_t>
238 requires std::invocable<t, args_t...>
239 constexpr decltype(
auto)
operator()(args_t... args)
const noexcept(std::is_nothrow_invocable_v<t, args_t...>)
241 return std::invoke(value, std::forward<args_t>(args)...);
249copyable_wrapper(t) -> copyable_wrapper<std::remove_reference_t<t>>;
257using copyable_wrapper_t = copyable_wrapper<std::remove_reference_t<t>>;
T construct_at(T... args)
T is_nothrow_constructible_v
SeqAn specific customisations in the standard namespace.