xtd 0.2.0
Loading...
Searching...
No Matches
xtd::collections::generic::helpers::comparer< type_t > Struct Template Reference

Definition

template<class type_t = void>
struct xtd::collections::generic::helpers::comparer< type_t >

Implements a function object for compare data.

struct comparer;
Implements a function object for compare data.
Definition comparer.hpp:31
Header
#include <xtd/collections/generic/helpers/comparer>
Namespace
xtd::collections::generic::helpers
Library
xtd.core

Public Aliases

using first_argument_type = type_t
 Represents the first argument type.
 
using second_argument_type = type_t
 Represents the second argument type.
 
using result_type = int32
 Represents the result type.
 

Public Operators

constexpr result_type operator() (const first_argument_type &x, const second_argument_type &y) const
 Compares two entities and returns a value indicating whether one is less than, equal to, or greater than the other.
 

Member Typedef Documentation

◆ first_argument_type

template<class type_t = void>
using xtd::collections::generic::helpers::comparer< type_t >::first_argument_type = type_t

Represents the first argument type.

◆ second_argument_type

template<class type_t = void>
using xtd::collections::generic::helpers::comparer< type_t >::second_argument_type = type_t

Represents the second argument type.

◆ result_type

template<class type_t = void>
using xtd::collections::generic::helpers::comparer< type_t >::result_type = int32

Represents the result type.

Member Function Documentation

◆ operator()()

template<class type_t = void>
constexpr result_type xtd::collections::generic::helpers::comparer< type_t >::operator() ( const first_argument_type x,
const second_argument_type y 
) const
inlineconstexpr

Compares two entities and returns a value indicating whether one is less than, equal to, or greater than the other.

Parameters
xThe first entity to compare.
yThe second entity to compare.
Returns
A 32-bit signed integer that indicates the relative order of the entities being compared. The return value has these meanings:
Value Condition
Less than zero x is less than y.
Zero x equals y.
Greater than zero x is greater than y.

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