Namespaces
Variants
Views
Actions

C++ concepts: LessThanComparable

From cppreference.com
< cpp‎ | concept
Revision as of 16:46, 24 September 2013 by RK (Talk | contribs)

 
 
 

The type must work with < operator and the result should have standard semantics.


Requirements

Expression Requirements Return type
a < b
  • !(x < x)
  • if a < b then !(b < a)
  • if a < b and b < c then a < c

(strict weak ordering relation)

bool or a type implicitly convertible to bool