xtd 1.0.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 {
27 template<xtd::forward_iterable source_t>
28 [[nodiscard]] auto from(const source_t& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
30 template<xtd::forward_iterable source_t>
31 [[nodiscard]] auto from(source_t& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
32 template<xtd::forward_iterable source_t>
33 [[nodiscard]] auto from(source_t&& source) noexcept {return xtd::linq::enumerable::as_enumerable(std::move(source));}
34 template<typename value_t>
35 [[nodiscard]] auto from(const std::initializer_list<value_t>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
36 template<std::forward_iterator iterator_t>
37 [[nodiscard]] auto from(iterator_t first, iterator_t last) noexcept {return xtd::linq::enumerable::as_enumerable(first, last);}
38 template<std::forward_iterator iterator_t>
39 [[nodiscard]] auto from(iterator_t iterator, xtd::usize length) noexcept {return xtd::linq::enumerable::as_enumerable(iterator, length);}
40 template<typename source_t, xtd::usize length>
41 [[nodiscard]] auto from(const source_t (&array)[length]) noexcept {return xtd::linq::enumerable::as_enumerable(array);}
42 template<typename source_t, xtd::usize length>
43 [[nodiscard]] auto from(source_t (&array)[length]) noexcept {return xtd::linq::enumerable::as_enumerable(array);}
44 template<xtd::usize size_>
45 [[nodiscard]] auto from(const std::bitset<size_>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
46 template<xtd::usize size_>
47 [[nodiscard]] auto from(std::bitset<size_>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
48 template<typename value_t, typename container_t>
49 [[nodiscard]] auto from(const std::queue<value_t, container_t>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
50 template<typename value_t, typename container_t>
51 [[nodiscard]] auto from(std::queue<value_t, container_t>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
52 template<typename value_t, typename container_t>
53 [[nodiscard]] auto from(const std::priority_queue<value_t, container_t>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
54 template<typename value_t, typename container_t>
55 [[nodiscard]] auto from(std::priority_queue<value_t, container_t>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
56 template<typename value_t, typename container_t>
57 [[nodiscard]] auto from(const std::stack<value_t, container_t>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
58 template<typename value_t, typename container_t>
59 [[nodiscard]] auto from(std::stack<value_t, container_t>& source) noexcept {return xtd::linq::enumerable::as_enumerable(source);}
61 }
62}
static auto as_enumerable(source_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
auto from(const source_t &source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition from.hpp:28
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
Contains xtd::linq::enumerable <type_t> class.
Provides classes and interfaces that support queries that use Language-Integrated Query (LINQ).
Definition enumerable_.hpp:56
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
const xtd::collections::generic::helpers::wrap_pointer_iterator< pointer > iterator
Represents the iterator of read_only_span value type.
Definition read_only_span.hpp:70
auto first() const -> read_only_span< type_t, count >
Obtains a subspan consisting of the first count elements of the sequence.
Definition read_only_span.hpp:248
auto last() const -> read_only_span< type_t, count >
Obtains a subspan consisting of the last N elements of the sequence.
Definition read_only_span.hpp:273
constexpr auto length() const noexcept -> size_type
Returns the length of the current read_only_span.
Definition read_only_span.hpp:212