38 template<
typename selector_t>
39 struct with_selector {
40 const selector_t& selector;
42 template <xtd::iterable iterable_t>
45 template <xtd::iterable iterable_t>
46 friend auto operator |(iterable_t&& source,
const with_selector& self) {
return self(std::forward<iterable_t>(source));}
57 template <xtd::iterable iterable_t,
typename selector_t>
62 template<
typename selector_t>
63 auto operator()(
const selector_t& selector)
const {
return with_selector {selector};}
76 template <xtd::iterable iterable_t>
77 friend auto operator |(iterable_t&& source,
const select_view& view) {
return view(std::forward<iterable_t>(source));}
static auto from(source_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto as_enumerable(source_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
The xtd::ranges::views::select_view class is used to select elements from a sequence.
Definition select_view.hpp:37
auto operator()(iterable_t &&source, const selector_t &selector) const
Projects each element of a sequence into a new form.
Definition select_view.hpp:58
auto operator()(const selector_t &selector) const
Projects each element of a sequence into a new form.
Definition select_view.hpp:63
friend auto operator|(iterable_t &&source, const select_view &view)
Applies a select projection on the given range using the pipe operator.
Definition select_view.hpp:77
Contains xtd::istringable interface.
Contains xtd::iterable concept.
Contains xtd::linq::enumerable <type_t> class.
The view namesapce contains range views, lightweight objects that indirectly represent iterable seque...
Definition distinct.hpp:20
The ranges namespace is an extension and generalization of the xtd::linq that makes them more powerfu...
Definition distinct.hpp:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::string alias.
Contains xtd::views alias namespace.