17namespace seqan3::detail
26concept boxable = std::copy_constructible<t> && std::is_object_v<t>;
38 constexpr copyable_wrapper(copyable_wrapper
const &) =
default;
39 constexpr copyable_wrapper(copyable_wrapper &&) =
default;
40 constexpr ~copyable_wrapper() =
default;
45 constexpr copyable_wrapper() noexcept(
std::is_nothrow_default_constructible_v<t>)
46 requires
std::default_initializable<t>
51 constexpr copyable_wrapper &
operator=(copyable_wrapper
const & other)
52 noexcept(std::is_nothrow_copy_constructible_v<t>)
53 requires (!std::copyable<t>)
66 constexpr copyable_wrapper &
operator=(copyable_wrapper && other)
noexcept(std::is_nothrow_move_constructible_v<t>)
67 requires (!std::movable<t>)
72 this->
emplace(std::move(*other));
90 template <
typename... args_t>
91 requires std::invocable<t, args_t...>
92 constexpr decltype(
auto)
operator()(args_t... args)
noexcept(std::is_nothrow_invocable_v<t, args_t...>)
98 template <
typename... args_t>
99 requires std::invocable<t, args_t...>
100 constexpr decltype(
auto)
operator()(args_t... args)
const noexcept(std::is_nothrow_invocable_v<t, args_t...>)
114 requires std::copyable<t>
115 || (std::is_nothrow_move_constructible_v<t> && std::is_nothrow_copy_constructible_v<t>)
117 && std::default_initializable<t>
119 class copyable_wrapper<t>
126 constexpr copyable_wrapper()
127 requires std::default_initializable<t>
130 constexpr copyable_wrapper(copyable_wrapper const &) = default;
131 constexpr copyable_wrapper(copyable_wrapper &&) = default;
132 constexpr ~copyable_wrapper() = default;
135 constexpr copyable_wrapper & operator=(copyable_wrapper const &)
136 requires
std::copyable<t>
140 constexpr copyable_wrapper & operator=(copyable_wrapper const & other) noexcept
152 constexpr copyable_wrapper & operator=(copyable_wrapper &&)
153 requires std::copyable<t>
157 constexpr copyable_wrapper & operator=(copyable_wrapper && other) noexcept
169 constexpr explicit copyable_wrapper(t
const & other)
noexcept(std::is_nothrow_copy_constructible_v<t>) :
174 constexpr explicit copyable_wrapper(t && other)
noexcept(std::is_nothrow_move_constructible_v<t>) :
179 template <
typename... args_t>
180 requires std::constructible_from<t, args_t...>
187 constexpr bool has_value() const noexcept
193 constexpr t & operator*() noexcept
199 constexpr t
const & operator*() const noexcept
205 constexpr t * operator->() noexcept
211 constexpr t
const * operator->() const noexcept
226 template <
typename... args_t>
227 requires std::invocable<t, args_t...>
228 constexpr decltype(
auto)
operator()(args_t... args)
noexcept(std::is_nothrow_invocable_v<t, args_t...>)
230 return std::invoke(value, std::forward<args_t>(args)...);
234 template <
typename... args_t>
235 requires std::invocable<t, args_t...>
236 constexpr decltype(
auto)
operator()(args_t... args)
const noexcept(std::is_nothrow_invocable_v<t, args_t...>)
238 return std::invoke(value, std::forward<args_t>(args)...);
246copyable_wrapper(t) -> copyable_wrapper<std::remove_reference_t<t>>;
254using 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.