xtd 1.0.0
Loading...
Searching...
No Matches
min_view.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#define __XTD_STD_INTERNAL__
8#undef __XTD_STD_INTERNAL__
10#include "../../istringable.hpp"
11#include "../../string.hpp"
12#include "../../views/views.hpp"
13
15#if defined(__xtd__cpp_lib_ranges)
17#include <ranges>
18
20namespace xtd {
22 namespace ranges {
24 namespace views {
25 class min_view {
26 public:
28
30 template <std::ranges::range range_t>
31 auto operator()(range_t&& source) const {return xtd::linq::enumerable::from(std::forward<range_t>(source)).min();}
32
33 template <std::ranges::range range_t>
34 friend auto operator |(range_t&& source, const min_view& view) {return view(std::forward<range_t>(source));}
36 };
37 }
38 }
39}
41#endif
static const auto & from(const ienumerable< source_t > &source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
Definition enumerable.hpp:680
Definition min_view.hpp:25
Contains xtd::istringable interface.
Contains xtd::linq::enumerable <type_t> class.
The view namesapce contains range views, lightweight objects that indirectly represent iterable seque...
Definition distinct.hpp:20
The ranges namespace is an extension and generalization of the xtd::linq that makes them more powerfu...
Definition distinct.hpp:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::string alias.
Contains xtd::views alias namespace.