xtd 0.2.0
Loading...
Searching...
No Matches
from.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "enumerable.hpp"
6
8namespace xtd {
10 namespace linq {
26 template <typename source_t>
28 return enumerable::as_enumerable(source);
29 }
45 template <typename source_t>
46 const xtd::collections::generic::ienumerable<source_t>& from(const std::initializer_list<source_t>& source) noexcept{
47 return enumerable::as_enumerable(source);
48 }
64 template <typename collection_t>
65 const auto& from(const collection_t& source) noexcept {
66 return enumerable::as_enumerable(source);
67 }
84 template <typename input_iterator_t>
85 const auto& from(input_iterator_t first, input_iterator_t last) noexcept {
86 return enumerable::as_enumerable(first, last);
87 }
105 template<typename input_iterator_t>
106 const auto& from(input_iterator_t iterator, size_t length) noexcept {
107 return enumerable::as_enumerable(iterator, iterator + length);
108 }
126 template<typename source_t, size_t length>
127 const auto& from(const source_t (&array)[length]) noexcept {
128 return enumerable::as_enumerable(array, array + length);
129 }
130 }
131}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:59
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:36
static const ienumerable< source_t > & as_enumerable(const ienumerable< source_t > &source) noexcept
Returns the input typed as xtd::collection::generic::ienumerable <type_t>.
Definition enumerable.hpp:234
const xtd::collections::generic::ienumerable< source_t > & from(const xtd::collections::generic::ienumerable< source_t > &source) noexcept
Returns the input typed as xtd::collection::generic::ienumerable <type_t>.
Definition from.hpp:27
Contains xtd::linq::enumerable <type_t> class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10