A definition is a unit of syntax that introduces a name N and associates some code with N.
In FPP, there are two kinds of definitions:
-
Global definitions that introduce globally visible qualified names.
-
Bound parameter definitions introduced by binding template arguments to template parameters within the scope of an expanded template. A bound parameter definition is a pair \$(p, A)\$ consisting of a template parameter p and a template argument A. The name associated with a bound parameter definition \$(p, A)\$ is the identifier specified in p. Bound parameter definitions come into scope during template expansion.
Within an expanded template, a bound parameter definition may represent a global definition, either directly or indirectly. A bound parameter definition \$B = (p, A)\$ represents a global definition D if (1) A refers to D or (2) A refers to a bound parameter definition B' that represents D.
Not all bound parameter definitions represent global definitions. For example, the bound parameter definition
( constant x : U32 , 0 )does not represent any global definition.
The rest of this section discusses the global definitions.