[temp.constr.constr.general]

# 13 Templates [[temp]](./#temp)

## 13.5 Template constraints [[temp.constr]](temp.constr#constr.general)

### 13.5.2 Constraints [[temp.constr.constr]](temp.constr.constr#general)

#### 13.5.2.1 General [temp.constr.constr.general]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/templates.tex#L1610)

A [*constraint*](#def:constraint "13.5.2.1 General [temp.constr.constr.general]") is a sequence of logical operations and
operands that specifies requirements on template arguments[.](#1.sentence-1)

The operands of a logical operation are constraints[.](#1.sentence-2)

There are five different kinds of constraints:

- [(1.1)](#1.1)

conjunctions ([[temp.constr.op]](temp.constr.op "13.5.2.2 Logical operations")),

- [(1.2)](#1.2)

disjunctions ([[temp.constr.op]](temp.constr.op "13.5.2.2 Logical operations")),

- [(1.3)](#1.3)

atomic constraints ([[temp.constr.atomic]](temp.constr.atomic "13.5.2.3 Atomic constraints")),

- [(1.4)](#1.4)

concept-dependent constraints ([[temp.constr.concept]](temp.constr.concept "13.5.2.4 Concept-dependent constraints")), and

- [(1.5)](#1.5)

fold expanded constraints ([[temp.constr.fold]](temp.constr.fold "13.5.2.5 Fold expanded constraint"))[.](#1.sentence-3)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/templates.tex#L1623)

In order for a constrained template to be instantiated ([[temp.spec]](temp.spec "13.9 Template instantiation and specialization")),
its [associated constraints](temp.constr.decl#def:associated_constraints "13.5.3 Constrained declarations [temp.constr.decl]") shall be satisfied as described in the following subclauses[.](#2.sentence-1)

[*Note [1](#note-1)*:

Forming the name of a specialization of
a class template,
a variable template, or
an alias template ([[temp.names]](temp.names "13.3 Names of template specializations"))
requires the satisfaction of its constraints[.](#2.sentence-2)

[Overload resolution](over.match.viable "12.2.3 Viable functions [over.match.viable]") requires the satisfaction of constraints
on functions and function templates[.](#2.sentence-3)

â *end note*]
