-
Notifications
You must be signed in to change notification settings - Fork 751
Q & A
-
Q. When to use
\term{}
vs.\defn{}
? -
A.
\defn
adds an index entry,\term
doesn't. As a general rule, all definitions in the spec should be indexed, and common terms or terms that are referenced outside of the immediate vicinity must be indexed. Therefore\term{}
should be avoided except when defining a term that is only used locally. There's also\defnx{name of term}{index entry}
if the name of term and the index entry should be different. For instance:\defnx{point of instantiation}{instantiation, point of}
-
Q. How does
\impldef{}
work and when to use it? -
A.
\impldef
does two things. First, it expands to the words "implementation defined". Second, it adds an entry to the index of implementation defined behaviors at the very end of the standard. (The name of that index entry is between the braces.) -
Q. I noticed some things were added to the index while others were not – when should something be indexed?
-
A. Whenever it'd be useful to find something in the index, we should add an index entry.
-
Q. In CWG1750, we have “
reference to possibly cv-qualified T
”; why whole phrase in "s here? -
A. This is the standard's "internal representation" of types, after the algorithm in [dcl.meaning] converts a declarator into the represented type. See the subclauses of [dcl.meaning] for examples.
-
Q. In CWG609,
“For a type \cv\ \tcode{T},”
Why isn’t this “
\tcode{cv T},
”?“of that type are those denoted by \cv.”
Is “
\cv
” some special thing in the std? -
A. We use
\cv
to get an italicized 'cv'. This is a special notation in the standard, see [basic.type.qualifier]p5. That said, the Latex source used to emit /cv/ in the standard is very inconsistent - see the "Specification-Style-Guidelines" for the preferred encoding. -
Q. cv in cv-unqualified is sometimes in italics, other times not (eg. 20.4.2.5). Which is right?
-
A. The 'cv' in 'cv-unqualified' should never be italics. For instance:
An expression of type cv T can be converted to cv-unqualified T
The first 'cv' should be \cv (as a placeholder), thus italicized; the second is just part of the word 'cv-unqualified', which is an adjective to 'T'. Note that the 'cv-unqualified' in the example is redundant, because the introduction of 'T' with 'cv T' makes it clear that the cv-qualification of the type in question is considered separately. 20.4.2.5's uses of cv-unqualified should not be italicized.