The xtd::ranges::views::select_view class is used to select elements from a sequence.
- Definition
The xtd::ranges::views::select_view class is used to select elements from a sequence.
Definition select_view.hpp:44
- Header
#include <xtd/ranges/views/select_view>
- Namespace
- xtd::ranges::views
- Library
- xtd.core
- Examples
- The following example shows how to use xtd::ranges::views::select instance :
#include <xtd/xtd>
auto main() -> int {
auto numbers =
array {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:63
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
constexpr auto select
The xtd::ranges::views::select instance.
Definition select.hpp:40
@ n
The N key.
Definition console_key.hpp:114
The following example shows how to use xtd::ranges::views::select_view class : #include <xtd/xtd>
auto main() -> int {
auto numbers =
array {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
}
|
template<std::ranges::range range_t, typename selector_t> |
auto | operator() (range_t &&source, const selector_t &selector) const |
| Projects each element of a sequence into a new form.
|
|
template<typename selector_t> |
auto | operator() (const selector_t &selector) const |
| Projects each element of a sequence into a new form.
|
|
◆ operator()() [1/2]
template<std::ranges::range range_t, typename selector_t>
auto xtd::ranges::views::select_view::operator() |
( |
range_t && | source, |
|
|
const selector_t & | selector ) const |
|
inline |
Projects each element of a sequence into a new form.
- Parameters
-
source | A sequence of values to invoke a transform function on. |
selector | A transform function to apply to each element. |
- Returns
- An iterable select elements from the source sequence.
◆ operator()() [2/2]
template<typename selector_t>
auto xtd::ranges::views::select_view::operator() |
( |
const selector_t & | selector | ) |
const |
|
inline |
Projects each element of a sequence into a new form.
- Parameters
-
selector | A transform function to apply to each element. |
- Returns
- An iterable select elements from the source sequence.
The documentation for this class was generated from the following file: