swift
Loading...
Searching...
No Matches
swift::misc::mixin::LessThanByCompare< Derived > Class Template Reference

CRTP class template from which a derived class can inherit operator< implemented using its compare function. More...

#include <mixincompare.h>

Friends

bool operator< (const Derived &a, const Derived &b)
 Less than.
bool operator> (const Derived &a, const Derived &b)
 Greater than.
bool operator<= (const Derived &a, const Derived &b)
 Less than or equal.
bool operator>= (const Derived &a, const Derived &b)
 Greater than or equal.

Detailed Description

template<class Derived>
class swift::misc::mixin::LessThanByCompare< Derived >

CRTP class template from which a derived class can inherit operator< implemented using its compare function.

Template Parameters
DerivedMust overload a function bool compare(const Derived &, const Derived &) which can be found by ADL.

Definition at line 118 of file mixincompare.h.

◆ operator<

template<class Derived>
bool operator< ( const Derived & a,
const Derived & b )
friend

Less than.

Definition at line 122 of file mixincompare.h.

◆ operator<=

template<class Derived>
bool operator<= ( const Derived & a,
const Derived & b )
friend

Less than or equal.

Definition at line 128 of file mixincompare.h.

◆ operator>

template<class Derived>
bool operator> ( const Derived & a,
const Derived & b )
friend

Greater than.

Definition at line 125 of file mixincompare.h.

◆ operator>=

template<class Derived>
bool operator>= ( const Derived & a,
const Derived & b )
friend

Greater than or equal.

Definition at line 131 of file mixincompare.h.


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