xtd 1.0.0
Loading...
Searching...
No Matches
to_array_view.hpp
Go to the documentation of this file.
1
4#pragma once
5
8#include "../../iterable.hpp"
9#include "../../string.hpp"
10#include "../../views/views.hpp"
11
13namespace xtd {
15 namespace ranges {
17 namespace views {
38 public:
40
45 template <xtd::iterable iterable_t>
46 auto operator()(iterable_t&& source) const {return xtd::linq::enumerable::from(std::forward<iterable_t>(source)).to_array();}
47
59 template <xtd::iterable iterable_t>
60 friend auto operator |(iterable_t&& source, const to_array_view& view) {return view(std::forward<iterable_t>(source));}
62 };
63 }
64 }
65}
static auto from(source_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
The xtd::ranges::views::to_array_view class is used to convert a sequence to an array.
Definition to_array_view.hpp:37
auto operator()(iterable_t &&source) const
Converts a sequence of values to an array.
Definition to_array_view.hpp:46
friend auto operator|(iterable_t &&source, const to_array_view &view)
Applies a filter on the given range using the pipe operator.
Definition to_array_view.hpp:60
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.