able "cpp/concepts/equality comparable")  
[ totally_ordered  totally_ordered_with  ](/w/cpp/concepts/totally_ordered
"cpp/concepts/totally ordered")  
Object concepts  
[ movable  ](/w/cpp/concepts/movable "cpp/concepts/movable")  
[ copyable  ](/w/cpp/concepts/copyable "cpp/concepts/copyable")  
[ semiregular  ](/w/cpp/concepts/semiregular "cpp/concepts/semiregular")  
[ regular  ](/w/cpp/concepts/regular "cpp/concepts/regular")  
Callable concepts  
[ invocable  regular_invocable  ](/w/cpp/concepts/invocable
"cpp/concepts/invocable")  
[ predicate  ](/w/cpp/concepts/predicate "cpp/concepts/predicate")  
[ relation  ](/w/cpp/concepts/relation "cpp/concepts/relation")  
[ equivalence_relation  ](/w/cpp/concepts/equivalence_relation
"cpp/concepts/equivalence relation")  
[ strict_weak_order  ](/w/cpp/concepts/strict_weak_order "cpp/concepts/strict
weak order")  
  
|  Exposition-only concepts  
---  
[ _boolean-testable_ ](/w/cpp/concepts/boolean-testable "cpp/concepts/boolean-
testable")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/concepts/navbar_content&action=edit)

The concepts library provides definitions of fundamental library concepts that
can be used to perform compile-time validation of template arguments and
perform function dispatch based on properties of types. These concepts provide
a foundation for equational reasoning in programs.

Most concepts in the standard library impose both syntactic and semantic
requirements. It is said that a standard concept is _satisfied_ if its
syntactic requirements are met, and is _modeled_ if it is satisfied and its
semantic requirements (if any) are also met.

In general, only the syntactic requirements can be checked by the compiler. If
the validity or meaning of a program depends whether a sequence of template
arguments models a concept, and the concept is satisfied but not modeled, or
if a semantic requirement is not met at the point of use, the program is ill-
formed, [ no diagnostic required ](/w/cpp/language/ndr "cpp/language/ndr") .

##  Contents

  * 1  Equality preservation 
  * 2  Implicit expression variations 
  * 3  Standard library concepts 
    * 3.1  Core language concepts 
    * 3.2  Comparison concepts 
    * 3.3  Object concepts 
    * 3.4  Callable concepts 
  * 4  See also 

  
---  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/concepts&action=edit&section=1
"Edit section: Equality preservation") ]  Equality preservation

An expression is _equality-preserving_ if it results in equal outputs given
equal inputs, where

  * the inputs consist of its operands (not neccessarily making the expression semantically valid), and 
  * the outputs consist of its result and all modifications to the operands by the expression, if any 

where, for convenience of wording, its "operands" refer to its largest sub-
expressions that consist of an [ id-expression
](/w/cpp/language/expressions#Primary_expressions "cpp/language/expressions")
or invocations of [ ` std::move ` ](/w/cpp/utility/move "cpp/utility/move") ,
[ std::forward ](/w/cpp/utility/forward "cpp/utility/forward") , and  [
std::declval ](/w/cpp/utility/declval "cpp/utility/declval") .

The cv-qualification and value category of each operand is determined by
assuming that each template type parameter in its type denotes a cv-
unqualified complete non-array object type.

Every expression required to be equality preserving is further required to be
stable, that is, two evaluations of it with the same input objects must have
equal outputs without any explicit intervening modification of those input
objects.

Unless noted otherwise, every expression used in a [ requires  expression
](/w/cpp/language/requires "cpp/language/requires") of the  standard library
concepts  is required to be equality preserving, and the evaluation of the
expression may modify only its non-constant operands. Operands that are
constant must not be modified.

In the standard library, the following concepts are a