swift
Loading...
Searching...
No Matches
swift::misc::mixin::EqualsByCompare< 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)
 Equals.
bool operator!= (const Derived &a, const Derived &b)
 Not equal.

Detailed Description

template<class Derived>
class swift::misc::mixin::EqualsByCompare< 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 31 of file mixincompare.h.

◆ operator!=

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

Not equal.

Definition at line 38 of file mixincompare.h.

◆ operator==

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

Equals.

Definition at line 35 of file mixincompare.h.


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