xtd 0.2.0
Loading...
Searching...
No Matches
xtd::ranges::views::distinct_view Class Reference

Definition

The xtd::ranges::views::distinct_view class is used to distinct elements from a sequence.

Definition
The xtd::ranges::views::distinct_view class is used to distinct elements from a sequence.
Definition distinct_view.hpp:39
Header
#include <xtd/ranges/views/distinct_view>
Namespace
xtd::ranges::views
Library
xtd.core

Public Operators

template<std::ranges::range range_t>
auto operator() (range_t &&source) const
 Returns distinct elements from a sequence by using the default equality comparer to compare values.
 
template<std::ranges::range range_t, typename comparer_t>
auto operator() (range_t &&source, const comparer_t &comparer) const
 Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_comparer <type_t> to compare values.
 
template<typename comparer_t>
auto operator() (const comparer_t &comparer) const
 Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_comparer <type_t> to compare values.
 

Member Function Documentation

◆ operator()() [1/3]

template<std::ranges::range range_t>
auto xtd::ranges::views::distinct_view::operator() ( range_t && source) const
inline

Returns distinct elements from a sequence by using the default equality comparer to compare values.

Parameters
sourceThe sequence to remove duplicate elements from.
Returns
An iterable distinct elements from the source sequence.

◆ operator()() [2/3]

template<std::ranges::range range_t, typename comparer_t>
auto xtd::ranges::views::distinct_view::operator() ( range_t && source,
const comparer_t & comparer ) const
inline

Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_comparer <type_t> to compare values.

Parameters
sourceThe sequence to remove duplicate elements from.
comparerAn xtd::collections::generic::iequality_comparer <type_t> to compare values.
Returns
An iterable distinct elements from the source sequence.

◆ operator()() [3/3]

template<typename comparer_t>
auto xtd::ranges::views::distinct_view::operator() ( const comparer_t & comparer) const
inline

Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_comparer <type_t> to compare values.

Parameters
comparerAn xtd::collections::generic::iequality_comparer <type_t> to compare values.
Returns
An iterable distinct elements from the source sequence.

The documentation for this class was generated from the following file: