26concept boxable = std::copy_constructible<t> && std::is_object_v<t>;
46 requires
std::default_initializable<t>
53 requires (!std::copyable<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>
127 requires std::default_initializable<t>
136 requires
std::copyable<t>
153 requires std::copyable<t>
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>) :
175 value{
std::move(other)}
179 template <
typename... args_t>
180 requires std::constructible_from<t, args_t...>
183 value{
std::forward<args_t>(args)...}
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)...);
constexpr copyable_wrapper(t &&other) noexcept(std::is_nothrow_move_constructible_v< t >)
Move construct from value.
Definition copyable_wrapper.hpp:174
constexpr t & operator*() noexcept
Returns a reference to the wrapped object. Part of the std::optional API.
Definition copyable_wrapper.hpp:193
constexpr copyable_wrapper(std::in_place_t, args_t... args) noexcept(std::is_nothrow_constructible_v< t, args_t... >)
Construct from argument pack. Part of the std::optional API.
Definition copyable_wrapper.hpp:181
constexpr copyable_wrapper(t const &other) noexcept(std::is_nothrow_copy_constructible_v< t >)
Copy construct from value.
Definition copyable_wrapper.hpp:169
constexpr t const & operator*() const noexcept
Returns a reference to the wrapped object. Part of the std::optional API.
Definition copyable_wrapper.hpp:199
constexpr t * operator->() noexcept
Returns a pointer to the wrapped object. Part of the std::optional API.
Definition copyable_wrapper.hpp:205
constexpr bool has_value() const noexcept
Return whether the wrapper contains a value. Part of the std::optional API.
Definition copyable_wrapper.hpp:187
constexpr t const * operator->() const noexcept
Returns a pointer to the wrapped object. Part of the std::optional API.
Definition copyable_wrapper.hpp:211
constexpr copyable_wrapper & operator=(copyable_wrapper &&)=default
Move assignment for copyable types is the default move assignment.
constexpr copyable_wrapper()=default
copyable_wrapper is default constructible, iff the wrapped type is default initialisable.
Utility wrapper that behaves like std::optional but makes the type conform with the std::copyable con...
Definition copyable_wrapper.hpp:34
constexpr ~copyable_wrapper()=default
Defaulted.
constexpr copyable_wrapper(copyable_wrapper &&)=default
Defaulted.
constexpr copyable_wrapper & operator=(copyable_wrapper const &other) noexcept(std::is_nothrow_copy_constructible_v< t >)
Copy assignment for non-copyable wrapped types.
Definition copyable_wrapper.hpp:52
constexpr copyable_wrapper() noexcept(std::is_nothrow_default_constructible_v< t >)
Use a specialised default constructor, if the wrapped type is default initialisable....
Definition copyable_wrapper.hpp:45
constexpr copyable_wrapper & operator=(copyable_wrapper &&other) noexcept(std::is_nothrow_move_constructible_v< t >)
Move assignment for non-movable wrapped types.
Definition copyable_wrapper.hpp:66
copyable_wrapper(t) -> copyable_wrapper< std::remove_reference_t< t > >
Type deduction guide that strips references.
constexpr copyable_wrapper(copyable_wrapper const &)=default
< Use std::optional assignment operators.
Helper concept for seqan3::detail::copyable_wrapper.
Definition copyable_wrapper.hpp:26
T construct_at(T... args)
T is_nothrow_constructible_v
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
SeqAn specific customisations in the standard namespace.