Namespaces
Variants
Actions

std::equal_to, not_equal_to, less, greater, less_equal, greater_equal(std::experimental::propagate_const)

From cppreference.com
 
C++
 
Experimental
Technical Specification
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges (ranges TS)
Reflection (reflection TS)
Mathematical special functions (special functions TR)
Experimental Non-TS
Pattern Matching
Linear Algebra
std::execution
Contracts
2D Graphics
 
Library fundamentals v2
 
std::experimental::propagate_const
template< class T > struct equal_to<std::experimental::propagate_const<T>>;
(library fundamentals TS v2)
template< class T > struct not_equal_to<std::experimental::propagate_const<T>>;
(library fundamentals TS v2)
template< class T > struct less<std::experimental::propagate_const<T>>;
(library fundamentals TS v2)
template< class T > struct greater<std::experimental::propagate_const<T>>;
(library fundamentals TS v2)
template< class T > struct less_equal<std::experimental::propagate_const<T>>;
(library fundamentals TS v2)
template< class T > struct greater_equal<std::experimental::propagate_const<T>>;
(library fundamentals TS v2)

The standard comparison function objects are partially specialized for std::experimental::propagate_const<T>.

Let p.t_ denote the pointer-like object wrapped by a std::experimental::propagate_const<T> p, then given objects p and q of type std::experimental::propagate_const<T>, the following shall hold:

[edit] Notes

These specializations ensure that when T is a pointer type, specializations of these class templates for std::experimental::propagate_const<T> yield a total order, even if the corresponding built-in operators do not.

[edit] Example

[edit] See also

function object implementing x == y
(class template) [edit]
function object implementing x != y
(class template) [edit]
function object implementing x < y
(class template) [edit]
function object implementing x > y
(class template) [edit]
function object implementing x <= y
(class template) [edit]
function object implementing x >= y
(class template) [edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant