25template <
typename container_t>
26 requires (!std::ranges::view<container_t>)
34 template <std::ranges::input_range rng_t>
35 requires std::convertible_to<std::ranges::range_reference_t<rng_t>, std::ranges::range_value_t<container_t>>
42 template <std::ranges::input_range rng_t>
44 requires std::ranges::input_range<std::ranges::range_value_t<rng_t>>
58 template <std::ranges::input_range rng_t,
typename... args_t>
59 constexpr auto operator()(rng_t && rng, args_t &&... args)
const
61 auto new_container = container_t(std::forward<args_t>(args)...);
64 if constexpr (std::ranges::sized_range<rng_t> &&
requires (container_t c) { c.reserve(
size_t{}); })
67 impl(std::forward<rng_t>(rng), new_container);
75template <
template <
typename>
typename container_t>
84 template <std::ranges::input_range rng_t,
typename... args_t>
85 constexpr auto operator()(rng_t && rng, args_t &&... args)
const
88 return adaptor(std::forward<rng_t>(rng), std::forward<args_t>(args)...);
94namespace seqan3::ranges
113template <
typename container_t,
typename... args_t>
114constexpr auto to(args_t &&... args)
123template <
template <
typename...>
typename container_t,
typename... args_t>
124constexpr auto to(args_t &&... args)
133template <
typename container_t, std::ranges::input_range rng_t,
typename... args_t>
134constexpr auto to(rng_t && rng, args_t &&... args)
137 std::forward<args_t>(args)...}(std::forward<rng_t>(rng));
144template <
template <
class...>
typename container_t, std::ranges::input_range rng_t,
typename... args_t>
145constexpr auto to(rng_t && rng, args_t &&... args)
148 std::forward<args_t>(args)...}(std::forward<rng_t>(rng));
Provides seqan3::detail::adaptor_from_functor.
T back_inserter(T... args)
Template for range adaptor closure objects that store arguments and wrap a proto-adaptor.
Definition: adaptor_from_functor.hpp:57
constexpr auto to(rng_t &&rng, args_t &&... args)
Converts a range to a container.This is an overloaded member function, provided for convenience....
Definition: to.hpp:134
decltype(detail::transform< trait_t >(list_t{})) transform
Apply a transformation trait to every type in the list and return a seqan3::type_list of the results.
Definition: type_list/traits.hpp:470
constexpr size_t size
The size of a type pack.
Definition: type_pack/traits.hpp:146
The (most general) container concept as defined by the standard library.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Function object to convert a std::ranges::input_range to a fully defined container.
Definition: to.hpp:28
auto impl(rng_t &&rng, container_t &container) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: to.hpp:43
constexpr auto operator()(rng_t &&rng, args_t &&... args) const
Converts a template-template into a container.
Definition: to.hpp:59
auto impl(rng_t &&rng, container_t &container) const
Copies a range into a container.
Definition: to.hpp:36
Similar to to_fn, but accepts a template-template as argument, e.g.: to_fn<vector> instead of to_fn<v...
Definition: to.hpp:77
constexpr auto operator()(rng_t &&rng, args_t &&... args) const
Converts a template-template into a container.
Definition: to.hpp:85
Provides concepts that do not have equivalents in C++20.