|
322 | 322 | a defaulted copy/move constructor or copy/move assignment operator
|
323 | 323 | for a union of type \tcode{U} with a glvalue argument
|
324 | 324 | that does not denote an object of type \cv{}~\tcode{U} within its lifetime,
|
325 |
| -the behavior is undefined. |
| 325 | +the behavior is undefined.\ubdef{expr.basic.lvalue.union.initialization} |
326 | 326 | \begin{note}
|
327 | 327 | In C, an entire object of structure type can be accessed, e.g., using assignment.
|
328 | 328 | By contrast, \Cpp{} has no notion of accessing an object of class type
|
|
341 | 341 | If a pointer to $X$ would be valid in
|
342 | 342 | the context of the evaluation of the expression\iref{basic.fundamental},
|
343 | 343 | the result designates $X$;
|
344 |
| -otherwise, the behavior is undefined. |
| 344 | +otherwise, the behavior is undefined.\ubdef{expr.type.reference,lifetime} |
345 | 345 | \begin{note}
|
346 | 346 | Before the lifetime of the reference has started or after it has ended,
|
347 | 347 | the behavior is undefined (see~\ref{basic.life}).
|
|
680 | 680 |
|
681 | 681 | \item Otherwise, if the bits in the value representation of
|
682 | 682 | the object to which the glvalue refers
|
683 |
| -are not valid for the object's type, the behavior is undefined. |
| 683 | +are not valid for the object's type, the behavior is undefined.\ubdef{conv.lval.valid.representation} |
684 | 684 | \begin{example}
|
685 | 685 | \begin{codeblock}
|
686 | 686 | bool f() {
|
|
997 | 997 | integer type. The conversion truncates; that is, the fractional part is
|
998 | 998 | discarded.
|
999 | 999 | \indextext{value!undefined unrepresentable integral}%
|
1000 |
| -The behavior is undefined\ubdef{conv.fpint.not.represented} if the truncated value cannot be represented |
| 1000 | +The behavior is undefined\ubdef{conv.fpint.float.not.represented} if the truncated value cannot be represented |
1001 | 1001 | in the destination type.
|
1002 | 1002 | \begin{note}
|
1003 | 1003 | If the destination type is \keyword{bool}, see~\ref{conv.bool}.
|
|
1018 | 1018 | exactly as a value of the floating-point type.
|
1019 | 1019 | \end{note}
|
1020 | 1020 | If the value being converted is
|
1021 |
| -outside the range of values that can be represented, the behavior is undefined. If the |
| 1021 | +outside the range of values that can be represented, the behavior is undefined.\ubdef{conv.fpint.int.not.represented} |
| 1022 | +If the |
1022 | 1023 | source type is \keyword{bool}, the value \keyword{false} is converted to zero and the value
|
1023 | 1024 | \keyword{true} is converted to one.
|
1024 | 1025 |
|
|
1070 | 1071 | that is
|
1071 | 1072 | within its lifetime or
|
1072 | 1073 | within its period of construction or destruction\iref{class.cdtor},
|
1073 |
| -the behavior is undefined. |
| 1074 | +the behavior is undefined.\ubdef{conv.ptr.virtual.base} |
1074 | 1075 | Otherwise,
|
1075 | 1076 | the result is a pointer to the base class subobject of
|
1076 | 1077 | the derived class object.
|
|
1104 | 1105 | \tcode{D}, a program that necessitates this conversion is ill-formed.
|
1105 | 1106 | If class \tcode{D} does not contain the original member and
|
1106 | 1107 | is not a base class of the class containing the original member,
|
1107 |
| -the behavior is undefined. Otherwise, |
| 1108 | +the behavior is undefined.\ubdef{conv.member.missing.member} |
| 1109 | +Otherwise, |
1108 | 1110 | the result of the conversion refers to the same member as the pointer to
|
1109 | 1111 | member before the conversion took place, but it refers to the base class
|
1110 | 1112 | member as if it were a member of the derived class. The result refers to
|
|
4203 | 4205 | that is
|
4204 | 4206 | within its lifetime or
|
4205 | 4207 | within its period of construction or destruction,
|
4206 |
| -the behavior is undefined. |
| 4208 | +the behavior is undefined.\ubdef{expr.dynamic.cast.lifetime} |
4207 | 4209 |
|
4208 | 4210 | \pnum
|
4209 | 4211 | If \tcode{T} is ``pointer to \cv{} \keyword{void}'', then the result
|
|
4549 | 4551 | the result of the conversion is
|
4550 | 4552 | an \impldef{result of inexact floating-point conversion} choice of
|
4551 | 4553 | either of those values.
|
4552 |
| -Otherwise, the behavior is undefined\ubdef{expr.static.cast.downcast.wrong.derived.type}. |
| 4554 | +Otherwise, the behavior is undefined\ubdef{expr.static.cast.fp.outside.range}. |
4553 | 4555 |
|
4554 | 4556 | \pnum
|
4555 | 4557 | \indextext{cast!base class}%
|
|
4570 | 4572 | ``pointer to \cvqual{cv1} \tcode{B}'' points to a \tcode{B} that is
|
4571 | 4573 | actually a base class subobject of an object of type \tcode{D}, the resulting
|
4572 | 4574 | pointer points to the enclosing object of type \tcode{D}. Otherwise, the
|
4573 |
| -behavior is undefined. |
| 4575 | +behavior is undefined\ubdef{expr.static.cast.downcast.wrong.derived.type}. |
4574 | 4576 |
|
4575 | 4577 | \pnum
|
4576 | 4578 | \indextext{cast!pointer-to-member}%
|
|
4977 | 4979 | The operator yields an lvalue of type \tcode{T}.
|
4978 | 4980 | If the operand points to an object or function,
|
4979 | 4981 | the result denotes that object or function;
|
4980 |
| -otherwise, the behavior is undefined except as specified in \ref{expr.typeid}. |
| 4982 | +otherwise, the behavior is undefined except as specified in \ref{expr.typeid} |
| 4983 | +\ubdef{expr.unary.dereference}. |
4981 | 4984 | \begin{note}
|
4982 | 4985 | \indextext{type!incomplete}%
|
4983 | 4986 | Indirection through a pointer to an incomplete type (other than
|
|
0 commit comments