xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
ranges
views
to_list_view.hpp
Go to the documentation of this file.
1
4
#pragma once
5
6
#define __XTD_STD_INTERNAL__
7
#include "
../../internal/__xtd_std_version.hpp
"
8
#undef __XTD_STD_INTERNAL__
9
#include "
../../linq/enumerable.hpp
"
10
#include "
../../istringable.hpp
"
11
#include "
../../string.hpp
"
12
#include "
../../views/views.hpp
"
13
15
#if defined(__xtd__cpp_lib_ranges)
17
#include <ranges>
18
20
namespace
xtd
{
22
namespace
ranges
{
24
namespace
views
{
44
class
to_list_view
{
45
public
:
47
52
template
<std::ranges::range range_t>
53
auto
operator()
(range_t&& source)
const
{
return
xtd::linq::enumerable::from
(std::forward<range_t>(source)).to_list();}
54
66
template
<std::ranges::range range_t>
67
friend
auto
operator |
(range_t&& source,
const
to_list_view
& view) {
return
view(std::forward<range_t>(source));}
69
};
70
}
71
}
72
}
74
#endif
__xtd_std_version.hpp
xtd::linq::enumerable::from
static const auto & from(const ienumerable< source_t > &source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition
enumerable.hpp:694
xtd::ranges::views::to_list_view
The xtd::ranges::views::to_list_view class is used to convert a sequence to a list.
Definition
to_list_view.hpp:44
xtd::ranges::views::to_list_view::operator|
friend auto operator|(range_t &&source, const to_list_view &view)
Applies a filter on the given range using the pipe operator.
Definition
to_list_view.hpp:67
xtd::ranges::views::to_list_view::operator()
auto operator()(range_t &&source) const
Converts a sequence of values to a list.
Definition
to_list_view.hpp:53
istringable.hpp
Contains xtd::istringable interface.
enumerable.hpp
Contains xtd::linq::enumerable <type_t> class.
xtd::ranges::views
The view namesapce contains range views, lightweight objects that indirectly represent iterable seque...
Definition
distinct.hpp:20
xtd::ranges
The ranges namespace is an extension and generalization of the xtd::linq that makes them more powerfu...
Definition
distinct.hpp:18
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
string.hpp
Contains xtd::string alias.
views.hpp
Contains xtd::views alias namespace.
Generated on
for xtd by
Gammasoft
. All rights reserved.