@@ -24,19 +24,25 @@ namespace xtd {
2424 // / The following code example demonstrates how to use xtd::linq::from to create a sequence of values.
2525 // / @include linq_from3.cpp
2626 // / @see xtd::linq::enumerable::from methods for all overloads of xtd::linq::from.
27- template <typename collection_t >
28- [[nodiscard]] auto from (collection_t && source) noexcept {return enumerable::as_enumerable (source);}
27+ template <xtd::forward_iterable source_t >
28+ [[nodiscard]] auto from (source_t && source) noexcept {return enumerable::as_enumerable (source);}
2929 // / @cond
30- template <typename input_iterator_t >
31- [[nodiscard]] auto from (input_iterator_t first, input_iterator_t last) noexcept {return enumerable::as_enumerable (first, last);}
32- template <typename source_t >
33- [[nodiscard]] auto from (const xtd::collections::generic::ienumerable<source_t >& source) noexcept {return enumerable::as_enumerable (source);}
34- template <typename source_t >
35- [[nodiscard]] auto from (const std::initializer_list<source_t >& source) noexcept {return enumerable::as_enumerable (source);}
36- template <typename input_iterator_t >
37- [[nodiscard]] auto from (input_iterator_t iterator, xtd::usize length) noexcept {return enumerable::as_enumerable (iterator, iterator + length);}
30+ template <typename value_t >
31+ [[nodiscard]] auto from (const std::initializer_list<value_t >& source) noexcept {return enumerable::as_enumerable (source);}
32+ template <std::forward_iterator iterator_t >
33+ [[nodiscard]] auto from (iterator_t first, iterator_t last) noexcept {return enumerable::as_enumerable (first, last);}
34+ template <std::forward_iterator iterator_t >
35+ [[nodiscard]] auto from (iterator_t iterator, xtd::usize length) noexcept {return enumerable::as_enumerable (iterator, length);}
3836 template <typename source_t , xtd::usize length>
39- [[nodiscard]] auto from (const source_t (&array)[length]) noexcept {return enumerable::as_enumerable (array, array + length);}
37+ [[nodiscard]] auto from (const source_t (&array)[length]) noexcept {return enumerable::as_enumerable (array);}
38+ template <xtd::usize size_>
39+ [[nodiscard]] auto from (std::bitset<size_> source) noexcept {return enumerable::as_enumerable (source);}
40+ template <typename value_t , typename container_t >
41+ [[nodiscard]] auto from (std::queue<value_t , container_t > source) noexcept {return enumerable::as_enumerable (source);}
42+ template <typename value_t , typename container_t >
43+ [[nodiscard]] auto from (std::priority_queue<value_t , container_t > source) noexcept {return enumerable::as_enumerable (source);}
44+ template <typename value_t , typename container_t >
45+ [[nodiscard]] auto from (std::stack<value_t , container_t > source) noexcept {return enumerable::as_enumerable (source);}
4046 // / @endcond
4147 }
4248}
0 commit comments