29concept boxable = std::copy_constructible<t> && std::is_object_v<t>;
49 requires
std::default_initializable<t>
56 requires (!std::copyable<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>
130 requires std::default_initializable<t>
139 requires
std::copyable<t>
156 requires std::copyable<t>
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)...}
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)...);
Utility wrapper that behaves like std::optional but makes the type conform with the std::copyable con...
Definition: copyable_wrapper.hpp:123
constexpr copyable_wrapper(t &&other) noexcept(std::is_nothrow_move_constructible_v< t >)
Move construct from value.
Definition: copyable_wrapper.hpp:177
constexpr t & operator*() noexcept
Returns a reference to the wrapped object. Part of the std::optional API.
Definition: copyable_wrapper.hpp:196
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:184
constexpr copyable_wrapper(t const &other) noexcept(std::is_nothrow_copy_constructible_v< t >)
Copy construct from value.
Definition: copyable_wrapper.hpp:172
constexpr t const & operator*() const noexcept
Returns a reference to the wrapped object. Part of the std::optional API.
Definition: copyable_wrapper.hpp:202
constexpr t * operator->() noexcept
Returns a pointer to the wrapped object. Part of the std::optional API.
Definition: copyable_wrapper.hpp:208
constexpr bool has_value() const noexcept
Return whether the wrapper contains a value. Part of the std::optional API.
Definition: copyable_wrapper.hpp:190
constexpr t const * operator->() const noexcept
Returns a pointer to the wrapped object. Part of the std::optional API.
Definition: copyable_wrapper.hpp:214
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:37
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:55
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:48
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:69
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:29
T construct_at(T... args)
T is_nothrow_constructible_v
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
SeqAn specific customisations in the standard namespace.