Namespaces
Variants
Views
Actions

C++ concepts: EqualityComparable

From cppreference.com
< cpp | concept
Revision as of 15:16, 2 November 2012 by P12bot (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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


[edit] Requirements

Expression Requirements Return type
a == b
  • Commutativity (a == b yields the same as b == a)
  • Transitivity (if a == b and b == c, then a == c)
bool or a type implicitly convertible to bool