File: requirements.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (26 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
The bodies of tt(requires) declarations contain define constraints to apply to
template parameters. There are four types of requirements:
    itemization(
    it() em(Simple requirements): constraints on em(facilities) (like
        requiring the availability of tt(operator+));
    it() em(Type requirements): requiring the availability of (sub)types (like 
        the sub-type tt(value_type)) which must be available when using
        standard tt(push_back) functions;
    it() em(Compound requirements): requiring types resulting from applying
        operators or returned by called (member) functions;
    it() em(Nested requirements): defining concepts in terms of already
        existing concepts. 
    )
    
Constraints must be compile-time verifiable.

When multiple constraints are specified, they must em(all) be compile-time
verifiable, and an actual type is only accepted by the compiler if all
requirements could be satisfied. 

COMMENT(
Multiple constraints
can be defined by specifying multiple requirements in
tt(requires)-specifications and/or by 
combining constraints using the boolean operators tt(and, or) and tt(not).
END)