kblib 0.2.3
General utilities library for modern C++
kblib::equivalent< Compare, Obj > Struct Template Reference

A function object implementing the equivalence relationship over a comparison predicate. More...

#include <kblib/algorithm.h>

Public Member Functions

constexpr auto operator() (const Obj &a, const Obj &b, Compare comp) const noexcept(noexcept(equals(a, b, comp))) -> bool
 

Detailed Description

template<typename Compare = void, typename Obj = void>
struct kblib::equivalent< Compare, Obj >

A function object implementing the equivalence relationship over a comparison predicate.

Template Parameters
CompareThe predicate to compare over. If void, use the < operator. (Equivalent to defaulting to std::less.)
ObjThe type of objects to compare. If void, the operator() is a template.

Definition at line 123 of file algorithm.h.

Member Function Documentation

◆ operator()()

template<typename Compare = void, typename Obj = void>
constexpr auto kblib::equivalent< Compare, Obj >::operator() ( const Obj &  a,
const Obj &  b,
Compare  comp 
) const -> bool
inlineconstexprnoexcept

Definition at line 124 of file algorithm.h.


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