12#define __XTD_STD_INTERNAL__
14#undef __XTD_STD_INTERNAL__
15#define __XTD_CORE_INTERNAL__
19#undef __XTD_CORE_INTERNAL__
35struct __opaque_xtd_linq_enumerable_collection__;
36template<
class type_t,
class param_t>
37struct __opaque_xtd_linq_lazy_enumerable__;
44 template<
class type_t>
73 template<
class type_t>
77 template<
class type_t>
81 template<
class type_t>
85 template<
class type_t>
89 template<
class key_t,
class value_t>
104 template<
class source_t>
107 auto aggregated = source_t {};
108 for (
const auto& item : source)
109 if (nb++ == 0) aggregated = item;
110 else aggregated =
func(aggregated, item);
122 template<
class source_t>
124 auto aggregated = seed;
125 for (
const auto& item : source)
126 aggregated =
func(aggregated, item);
139 template<
class accumulate_t,
class source_t>
141 auto aggregated = seed;
142 for (
const auto& item : source)
143 aggregated =
func(aggregated, item);
156 template<
class source_t>
157 inline static source_t
aggregate(
const ienumerable<source_t>& source,
const source_t& seed,
const std::function<source_t(
const source_t&,
const source_t&)>&
func,
const std::function<source_t(
const source_t&)>& result_selector) {
158 auto aggregated = seed;
159 for (
const auto& item : source)
160 aggregated =
func(aggregated, item);
161 return result_selector(aggregated);
175 template<
class result_t,
class accumulate_t,
class source_t>
176 inline static result_t
aggregate(
const ienumerable<source_t>& source,
const accumulate_t& seed,
const std::function<accumulate_t(
const accumulate_t&,
const source_t&)>&
func,
const std::function<result_t(
const accumulate_t&)>& result_selector) {
177 auto aggregated = seed;
178 for (
const auto& item : source)
179 aggregated =
func(aggregated, item);
180 return result_selector(aggregated);
191 template<
class source_t>
193 for (
const auto& item : source)
206 template<
class source_t>
208 return source.begin() != source.end();
218 template<
class source_t>
220 for (
const auto& item : source)
233 template<
class source_t>
235 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
236 for (
const auto& item : source)
237 result.items.push_back(item);
238 result.items.push_back(element);
290 template<
class source_t>
301 template<
class source_t>
302 inline static auto as_enumerable(std::initializer_list<source_t> source)
noexcept {
303 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
304 for (
const auto& item : source)
305 result.items.push_back(item);
315 template<
class collection_t>
317 #if defined(__xtd__cpp_lib_ranges)
318 using source_t = std::ranges::range_value_t<collection_t>;
320 using source_t =
typename collection_t::value_type;
322 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
323 for (
auto&& item : source)
324 result.items.push_back(item);
335 template<
class input_iterator_t>
337 using source_t =
typename std::decay<
decltype(*first)>
::type;
338 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
339 for (
auto iterator =
first; iterator !=
last; ++iterator)
340 result.items.push_back(*iterator);
351 template<
class input_iterator_t>
363 template<
class source_t,
size_t length>
369 template<xtd::size size_>
371 template<
class source_t,
class container_t>
372 inline static auto as_enumerable(std::queue<source_t, container_t> source)
noexcept {
373 struct std_queue :
public std::queue<source_t> {
374 std_queue(
const std::queue<source_t>& queue) :
ptr {reinterpret_cast<const std_queue*>(&queue)} {}
375 auto begin()
const {
return ptr->c.begin();}
376 auto end()
const {
return ptr->c.end();}
377 const std_queue*
ptr;
379 auto items = std_queue {source};
382 template<
class source_t,
class container_t>
383 inline static auto as_enumerable(std::priority_queue<source_t, container_t> source)
noexcept {
384 struct std_priority_queue :
public std::priority_queue<source_t> {
385 std_priority_queue(
const std::priority_queue<source_t>& queue) :
ptr {reinterpret_cast<const std_priority_queue*>(&
queue)} {}
386 auto begin()
const {
return ptr->c.begin();}
387 auto end()
const {
return ptr->c.end();}
388 const std_priority_queue*
ptr;
390 auto items = std_priority_queue {source};
393 template<
class source_t,
class container_t>
394 inline static auto as_enumerable(std::stack<source_t, container_t> source)
noexcept {
395 struct std_stack :
public std::stack<source_t> {
396 std_stack(
const std::stack<source_t>& stack) :
ptr {reinterpret_cast<const std_stack*>(&
stack)} {}
397 auto begin()
const {
return ptr->c.begin();}
398 auto end()
const {
return ptr->c.end();}
399 const std_stack*
ptr;
401 auto items = std_stack {source};
460 template<
class result_t,
class source_t>
469 template<
class source_t>
477 template<
class source_t>
479 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
480 for (
const auto& item :
first)
481 result.items.push_back(item);
482 for (
const auto& item : second)
483 result.items.push_back(item);
492 template<
class source_t>
494 for (
const auto& item : source)
495 if (item == value)
return true;
505 template<
class source_t>
507 for (
const auto& item : source)
508 if (comparer.
equals(item, value))
return true;
519 template<
class source_t>
535 template<
class source_t>
545 template<
class source_t>
547 return count<source_t>(source, [value](
const source_t& item) ->
bool {
return item == value;});
559 template<
class key_t,
class source_t>
574 template<
class key_t,
class source_t>
576 auto result = __opaque_xtd_linq_enumerable_collection__<key_value_pair<key_t, xtd::size>> {};
580 auto key = key_selector(
enumerator.current());
581 auto index =
size_t {0};
582 for (; index < keys.count(); ++index)
583 if (key_comparer.equals(keys[index], key))
break;
584 if (index < keys.count()) result.items[index] = {key, result.items[index].value() + 1};
587 result.items.push_back({key, 1});
600 template<
class source_t>
613 template<
class source_t>
615 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
616 if (!
any(source)) result.items.push_back(default_value);
617 else for (
const auto& item : source)
618 result.items.push_back(item);
625 template<
class source_t>
627 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
628 for (
const auto& item : source)
630 result.items.push_back(item);
638 template<
class source_t>
640 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
641 for (
const auto& item : source)
642 if (!
contains(result, item, comparer))
643 result.items.push_back(item);
653 template<
class source_t>
656 return any(result) ? *result.begin() : default_value;
663 template<
class source_t>
672 template<
class source_t>
674 return any(source) ? *source.begin() : default_value;
680 template<
class source_t>
693 template<
class source_t>
705 template<
class source_t>
706 inline static auto from(std::initializer_list<source_t> source)
noexcept {
717 template<
class collection_t>
718 inline static auto from(collection_t&& source)
noexcept {
732 template<
class input_iterator_t>
733 inline static auto from(input_iterator_t
first, input_iterator_t
last)
noexcept {
745 template<
class input_iterator_t>
746 inline static auto from(input_iterator_t iterator,
size_t length)
noexcept {
758 template<
class source_t,
size_t length>
764 template<
class source_t,
class container_t>
765 inline static auto from(std::queue<source_t, container_t> source)
noexcept {
768 template<
class source_t,
class container_t>
769 inline static auto from(std::stack<source_t, container_t> source)
noexcept {
777 template<
class source_t>
785 template<
class source_t>
787 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
799 template<
class key_t,
class source_t>
801 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
802 result.items = std::vector<source_t> {source.begin(), source.end()};
803 std::sort(result.items.begin(), result.items.end(), [key_selector](
const source_t&
a,
const source_t&
b) {return key_selector(a) < key_selector(b);});
813 template<
class source_t>
815 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
816 result.items = std::vector<source_t> {source.begin(), source.end()};
817 std::sort(result.items.begin(), result.items.end(), [key_selector](
const source_t&
a,
const source_t&
b) {return key_selector(a) < key_selector(b);});
827 template<
class key_t,
class source_t>
829 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
830 result.items = std::vector<source_t> {source.begin(), source.end()};
831 std::sort(result.items.begin(), result.items.end(), [key_selector](
const source_t&
a,
const source_t&
b) {return key_selector(a) > key_selector(b);});
841 template<
class source_t>
843 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
844 result.items = std::vector<source_t> {source.begin(), source.end()};
845 std::sort(result.items.begin(), result.items.end(), [key_selector](
const source_t&
a,
const source_t&
b) {return key_selector(a) > key_selector(b);});
856 template<
class type_t>
858 auto step = type_t {};
869 template<
class type_t>
871 auto step = type_t {};
880 template<
class type_t>
881 inline static auto range(type_t start, type_t
count, type_t step) {
882 using param_type = std::tuple<type_t, type_t, type_t, type_t>;
883 auto numbers = __opaque_xtd_linq_lazy_enumerable__<type_t, param_type> {};
888 numbers = __opaque_xtd_linq_lazy_enumerable__<type_t, param_type> {
889 std::make_tuple(start,
count, step, type_t {}),
890 [](param_type & params) {
891 auto& result = std::get<0>(params);
892 auto&
count = std::get<1>(params);
893 auto& step = std::get<2>(params);
894 auto& index = std::get<3>(params);
895 if (index != 0) result += step;
896 return index++ <
count;
898 [start,
count, step](param_type & params) {
899 params = std::make_tuple(start,
count, step, type_t {});
914 template<
class result_t,
class source_t>
916 auto result = __opaque_xtd_linq_enumerable_collection__<result_t> {};
917 for (
const auto& item : source)
918 result.items.push_back(selector(item));
929 template<
class source_t>
931 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
932 for (
const auto& item : source)
933 result.items.push_back(selector(item));
945 template<
class result_t,
class source_t>
947 auto result = __opaque_xtd_linq_enumerable_collection__<result_t> {};
949 for (
const auto& item : source)
950 result.items.push_back(selector(item, index++));
961 template<
class source_t>
963 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
965 for (
const auto& item : source)
966 result.items.push_back(selector(item, index++));
978 template<
class source_t>
989 template<
class source_t>
1000 template<
class source_t>
1002 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
1003 for (
const auto& item : source)
1004 if (
predicate(item)) result.items.push_back(item);
1015 template<
class source_t>
1017 auto result = __opaque_xtd_linq_enumerable_collection__<source_t> {};
1019 for (
const auto& item : source)
1020 if (
predicate(item, index++)) result.items.push_back(item);
Contains xtd::array definitions.
Contains xtd::collections::generic::key_value_pair definitions.
Contains xtd::collections::generic::list definitions.
Contains __xtd_std_version definitions.
Contains xtd::collections::generic::helpers::allocator alias.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
static const comparer< xtd::any_object > default_comparer
Definition comparer.hpp:50
static auto default_equality_comparer() -> const equality_comparer &
Gets the default equality comparer for the type specified by the generic argument.
Definition equality_comparer.hpp:42
Definition raw_array.hpp:34
Exposes a method that compares two objects.
Definition icomparer.hpp:30
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:40
Defines methods to support the comparison of objects for equality.
Definition iequality_comparer.hpp:34
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
static void throws(xtd::helpers::exception_case exception_case, const source_location &location=source_location::current())
Throws an exption with specified exception case.
Provides a set of static methods for querying objects that implement ienumerable <type_t>.
Definition enumerable.hpp:67
static auto select(const ienumerable< source_t > &source, const std::function< result_t(const source_t &)> &selector)
Projects each element of a sequence into a new form.
Definition enumerable.hpp:915
static auto count_by(const ienumerable< source_t > &source, const std::function< key_t(const source_t &)> &key_selector, const iequality_comparer< key_t > &key_comparer) noexcept
Returns the count of elements in the source sequence grouped by key.
Definition enumerable.hpp:575
static xtd::decimal average(const ienumerable< xtd::decimal > &source)
Computes the average of a sequence of xtd::decimal values.
static auto default_if_empty(const ienumerable< source_t > &source) noexcept
Returns the elements of the specified sequence or the type parameter's default value in a singleton c...
Definition enumerable.hpp:601
static auto append(const ienumerable< source_t > &source, const source_t &element) noexcept
Appends a value to the end of the sequence.
Definition enumerable.hpp:234
static auto order_by_descending(const ienumerable< source_t > &source, const std::function< source_t(const source_t &)> &key_selector)
Sorts the elements of a sequence in descending order according to a key.
Definition enumerable.hpp:842
static auto as_enumerable(input_iterator_t iterator, size_t length) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:352
static auto from(input_iterator_t first, input_iterator_t last) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:733
static xtd::optional< float > average(const ienumerable< xtd::optional< float > > &source) noexcept
Computes the average of a sequence of optional float values.
static bool all(const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate)
Determines whether all elements of a sequence satisfy a condition.
Definition enumerable.hpp:192
typename xtd::collections::generic::ienumerable< type_t > ienumerable
Represents the ienumerable value type.
Definition enumerable.hpp:82
static xtd::optional< xtd::decimal > average(const ienumerable< xtd::optional< xtd::decimal > > &source) noexcept
Computes the average of a sequence of optional xtd::decimal values.
typename xtd::collections::generic::enumerator< type_t > enumerator
Represents the enumerator value type.
Definition enumerable.hpp:74
static auto cast(const ienumerable< source_t > &source) noexcept
Casts the elements of an xtd::collections::generic::ienumerable to the specified type.
static auto from(const source_t(&array)[length]) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:759
static auto as_enumerable(input_iterator_t first, input_iterator_t last) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:336
static result_t aggregate(const ienumerable< source_t > &source, const accumulate_t &seed, const std::function< accumulate_t(const accumulate_t &, const source_t &)> &func, const std::function< result_t(const accumulate_t &)> &result_selector)
Applies an accumulator function over a sequence. The specified seed value is used as the initial accu...
Definition enumerable.hpp:176
static double average(const ienumerable< xtd::int32 > &source)
Computes the average of a sequence of xtd::int32 values.
static bool any(const ienumerable< source_t > &source) noexcept
Determines whether a sequence contains any elements.
Definition enumerable.hpp:207
static bool any(const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate)
Determines whether any element of a sequence satisfies a condition.
Definition enumerable.hpp:219
static auto to_list(const ienumerable< source_t > &source) noexcept
Creates a xtd::collections::generic::list <type_t> from an xtd::collections::generic::ienumerable <ty...
static source_t aggregate(const ienumerable< source_t > &source, const source_t &seed, const std::function< source_t(const source_t &, const source_t &)> &func, const std::function< source_t(const source_t &)> &result_selector)
Applies an accumulator function over a sequence. The specified seed value is used as the initial accu...
Definition enumerable.hpp:157
static const auto & as_enumerable(const ienumerable< source_t > &source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:291
static bool contains(const ienumerable< source_t > &source, const source_t &value, const xtd::collections::generic::iequality_comparer< source_t > &comparer) noexcept
Determines whether a sequence contains a specified element by using a specified equality comparer.
Definition enumerable.hpp:506
typename xtd::collections::generic::iequality_comparer< type_t > iequality_comparer
Represents the ienumerable value type.
Definition enumerable.hpp:78
static auto distinct(const ienumerable< source_t > &source, const xtd::collections::generic::iequality_comparer< source_t > &comparer) noexcept
Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_c...
Definition enumerable.hpp:639
static auto range(type_t start, type_t count)
Generates a sequence of integral numbers within a specified range.
Definition enumerable.hpp:870
typename xtd::collections::generic::list< type_t > list
Represents the list value type.
Definition enumerable.hpp:86
static xtd::optional< double > average(const ienumerable< xtd::optional< xtd::int32 > > &source) noexcept
Computes the average of a sequence of optional xtd::int32 values.
static auto from(input_iterator_t iterator, size_t length) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:746
static auto select(const ienumerable< source_t > &source, const std::function< result_t(const source_t &, xtd::size)> &selector)
Projects each element of a sequence into a new form by incorporating the element's index.
Definition enumerable.hpp:946
static auto chunk(const ienumerable< source_t > &source, xtd::size size)
Splits the elements of a sequence into chunks of size at most size.
static double average(const ienumerable< double > &source)
Computes the average of a sequence of double values.
static accumulate_t aggregate(const ienumerable< source_t > &source, const accumulate_t &seed, const std::function< accumulate_t(const accumulate_t &, const source_t &)> &func)
Applies an accumulator function over a sequence. The specified seed value is used as the initial accu...
Definition enumerable.hpp:140
static bool contains(const ienumerable< source_t > &source, const source_t &value) noexcept
Determines whether a sequence contains a specified element by using the default equality comparer.
Definition enumerable.hpp:493
static double average(const ienumerable< xtd::int64 > &source)
Computes the average of a sequence of xtd::int64 values.
static auto to_array(const ienumerable< source_t > &source) noexcept
Creates a xtd::array <type_t> from an xtd::collections::generic::ienumerable <type_t>.
static auto where(const ienumerable< source_t > &source, const std::function< bool(const source_t &, xtd::size)> &predicate)
Filters a sequence of values based on a predicate. Each element's index is used in the logic of the p...
Definition enumerable.hpp:1016
static source_t first_or_default(const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate, const source_t &default_value) noexcept
Returns the first element of the sequence that satisfies a condition, or a specified default value if...
Definition enumerable.hpp:654
static auto select(const ienumerable< source_t > &source, const std::function< source_t(const source_t &, xtd::size)> &selector)
Projects each element of a sequence into a new form by incorporating the element's index.
Definition enumerable.hpp:962
static auto order(const ienumerable< source_t > &source, const xtd::collections::generic::icomparer< source_t > &comparer)
Sorts the elements of a sequence in ascending order.
Definition enumerable.hpp:786
static auto from(std::initializer_list< source_t > source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:706
static auto default_if_empty(const ienumerable< source_t > &source, const source_t &default_value) noexcept
Returns the elements of the specified sequence or the specified value in a singleton collection if th...
Definition enumerable.hpp:614
static source_t first_or_default(const ienumerable< source_t > &source, const source_t &default_value) noexcept
Returns the first element of the sequence that satisfies a condition or a default value if no such el...
Definition enumerable.hpp:673
static auto select(const ienumerable< source_t > &source, const std::function< source_t(const source_t &)> &selector)
Projects each element of a sequence into a new form.
Definition enumerable.hpp:930
static auto concat(const ienumerable< source_t > &first, const ienumerable< source_t > &second) noexcept
Concatenates two sequences.
Definition enumerable.hpp:478
static auto range(type_t start, type_t count, type_t step)
Generates a sequence of integral numbers within a specified range and step.
Definition enumerable.hpp:881
static auto order_by_descending(const ienumerable< source_t > &source, const std::function< key_t(const source_t &)> &key_selector)
Sorts the elements of a sequence in descending order according to a key.
Definition enumerable.hpp:828
static auto distinct(const ienumerable< source_t > &source) noexcept
Returns distinct elements from a sequence by using the default equality comparer to compare values.
Definition enumerable.hpp:626
static auto as_enumerable(const source_t(&array)[length]) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:364
static auto order_by(const ienumerable< source_t > &source, const std::function< source_t(const source_t &)> &key_selector)
Sorts the elements of a sequence in ascending order according to a key.
Definition enumerable.hpp:814
static auto order_by(const ienumerable< source_t > &source, const std::function< key_t(const source_t &)> &key_selector)
Sorts the elements of a sequence in ascending order according to a key.
Definition enumerable.hpp:800
static xtd::optional< double > average(const ienumerable< xtd::optional< double > > &source) noexcept
Computes the average of a sequence of optional double values.
static auto order(const ienumerable< source_t > &source)
Sorts the elements of a sequence in ascending order.
Definition enumerable.hpp:778
static float average(const ienumerable< float > &source)
Computes the average of a sequence of float values.
static auto from(collection_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:718
static auto where(const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate)
Filters a sequence of values based on a predicate.
Definition enumerable.hpp:1001
static auto count_by(const ienumerable< source_t > &source, const std::function< key_t(const source_t &)> &key_selector) noexcept
Returns the count of elements in the source sequence grouped by key.
Definition enumerable.hpp:560
xtd::collections::generic::key_value_pair< key_t, value_t > key_value_pair
Represents the key value pair value type.
Definition enumerable.hpp:90
static xtd::optional< double > average(const ienumerable< xtd::optional< xtd::int64 > > &source) noexcept
Computes the average of a sequence of optional xtd::int64 values.
static source_t aggregate(const ienumerable< source_t > &source, const source_t &seed, const std::function< source_t(const source_t &, const source_t &)> &func)
Applies an accumulator function over a sequence. The specified seed value is used as the initial accu...
Definition enumerable.hpp:123
static auto range(type_t count)
Generates a sequence of integral numbers within a specified range.
Definition enumerable.hpp:857
static auto as_enumerable(std::initializer_list< source_t > source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:302
static xtd::size count(const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate) noexcept
Returns a number that represents how many elements in the specified sequence satisfy a condition.
Definition enumerable.hpp:536
static source_t first_or_default(const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate) noexcept
Returns the first element of the sequence that satisfies a condition or a default value if no such el...
Definition enumerable.hpp:664
static xtd::size count(const ienumerable< source_t > &source) noexcept
Returns the number of elements in a sequence.
Definition enumerable.hpp:520
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
static source_t first_or_default(const ienumerable< source_t > &source) noexcept
Returns the first element of the sequence that satisfies a condition or a default value if no such el...
Definition enumerable.hpp:681
static source_t aggregate(const ienumerable< source_t > &source, const std::function< source_t(const source_t &, const source_t &)> &func)
Applies an accumulator function over a sequence.
Definition enumerable.hpp:105
static auto as_enumerable(collection_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:316
static xtd::size count(const ienumerable< source_t > &source, const source_t &value) noexcept
Returns the number of elements with the specified value.
Definition enumerable.hpp:546
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.
Contains xtd::collections::generic::extensions::enumerable <type_t> class.
Contains xtd::decimal type.
Contains xtd::collections::generic::equality_comparer <type_t> class.
Contains xtd::linq::from methods.
Contains xtd::collections::generic::comparer <type_t> class.
Contains xtd::collections::generic::enumerator <type_t> class.
generic::queue< xtd::any_object > queue
Represents a first-in, first-out collection of objects.
Definition queue.hpp:27
xtd::delegate< result_t(arguments_t... arguments)> func
Represents a delegate that has variables parameters and returns a value of the type specified by the ...
Definition func.hpp:27
std::stack< type_t, container_t > stack
Represents a variable size last-in-first-out (LIFO) collection of instances of the same specified typ...
Definition stack.hpp:34
@ argument
The argument is not valid.
Definition exception_case.hpp:31
@ argument_out_of_range
The argument is out of range.
Definition exception_case.hpp:35
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
std::type_info type
Stores information about a type.
Definition type.hpp:23
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
std::optional< type_t > optional
Represents the optional alias on std::optional.
Definition optional.hpp:25
std::any any
Represents the any alias on std::any.
Definition any.hpp:24
xtd::func< bool, type_t > predicate
Represents a delegate that defines a set of criteria and determines whether the specified object meet...
Definition predicate.hpp:16
@ a
The A key.
Definition console_key.hpp:88
@ b
The B key.
Definition console_key.hpp:90
Contains xtd::iequatable interface.
Contains xtd::int32 type.
Contains xtd::int64 type.
Contains xtd::collections::generic::helpers::lesser struct.
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
Provides classes and interfaces that support queries that use Language-Integrated Query (LINQ).
Definition enumerable.hpp:50
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
const_iterator begin() const
Returns an iterator to the beginning.
Definition read_only_span.hpp:183
read_only_span< type_t, count > first() const
Obtains a subspan consisting of the first count elements of the sequence.
Definition read_only_span.hpp:282
const_iterator end() const
Returns an iterator to the end.
Definition read_only_span.hpp:213
read_only_span< type_t, count > last() const
Obtains a subspan consisting of the last N elements of the sequence.
Definition read_only_span.hpp:307
constexpr size_type length() const noexcept
Returns the length of the current read_only_span.
Definition read_only_span.hpp:229
Contains xtd::optional type.
Contains xtd::collections::generic::helpers::raw_array class.
Contains xtd::static_object class.
Supports a simple iteration over a generic collection.
Definition enumerator.hpp:38
Implements a function object for compare data.
Definition lesser.hpp:39
Defines a key/value pair that can be set or retrieved.
Definition key_value_pair.hpp:37