|
460 | 460 | \pnum |
461 | 461 | \ubxref{expr.call.different.type} \\ |
462 | 462 | Calling a function through an expression whose function type is different from the function type of the called |
463 | | -function’s definition results in undefined behavior. |
| 463 | +function's definition results in undefined behavior. |
464 | 464 |
|
465 | 465 | \pnum |
466 | 466 | \begin{example} |
|
814 | 814 |
|
815 | 815 | \pnum |
816 | 816 | \ubxref{expr.add.polymorphic} \\ |
817 | | -For addition or subtraction, if the expressions P or Q have type “pointer to cv T”, where T and the array |
| 817 | +For addition or subtraction, if the expressions P or Q have type ``pointer to cv T'', where T and the array |
818 | 818 | element type are not similar \iref{conv.rval}, the behavior is undefined. |
819 | 819 |
|
820 | 820 | \pnum |
|
1183 | 1183 | \pnum |
1184 | 1184 | \ubxref{class.dtor.not.class.type} \\ |
1185 | 1185 | The invocation of a destructor is subject to the usual rules for |
1186 | | -member functions \iref{class.mfct}; that is, if the object is not of the destructor’s class type and not of a class derived |
1187 | | -from the destructor’s class type (including when the destructor is invoked via a null pointer value), the |
| 1186 | +member functions \iref{class.mfct}; that is, if the object is not of the destructor's class type and not of a class derived |
| 1187 | +from the destructor's class type (including when the destructor is invoked via a null pointer value), the |
1188 | 1188 | program has undefined behavior. |
1189 | 1189 |
|
1190 | 1190 | \pnum |
|
1266 | 1266 | int n = y.x.a; |
1267 | 1267 | y.k = 4; // OK, ends lifetime of \tcode{y.x}, \tcode{y.k} is active member of union |
1268 | 1268 | y.x.b = n; // undefined behavior: \tcode{y.x.b} modified outside its lifetime, |
1269 | | - // \tcode{S(y.x.b)} is empty because \tcode{X}’s default constructor is deleted, |
| 1269 | + // \tcode{S(y.x.b)} is empty because \tcode{X}'s default constructor is deleted, |
1270 | 1270 | // so union member \tcode{y.x}'s lifetime does not implicitly start |
1271 | 1271 | } |
1272 | 1272 | \end{codeblock} |
|
1366 | 1366 | extern B bobj; |
1367 | 1367 | B *pb = &bobj; // OK |
1368 | 1368 | int *p1 = &bobj.a; // undefined, refers to base class member |
1369 | | -int *p2 = &bobj.y.i; // undefined, refers to member’s member |
| 1369 | +int *p2 = &bobj.y.i; // undefined, refers to member's member |
1370 | 1370 |
|
1371 | 1371 | A *pa = &bobj; // undefined, upcast to a base class type |
1372 | 1372 | B bobj; // definition of \tcode{bobj} |
|
1423 | 1423 | \pnum |
1424 | 1424 | \ubxref{class.cdtor.virtual.not.x} \\ |
1425 | 1425 | When a virtual function is called directly or indirectly from a constructor or from a destructor, |
1426 | | -including during the construction or destruction of the class’s non-static data members, and the object to |
| 1426 | +including during the construction or destruction of the class's non-static data members, and the object to |
1427 | 1427 | which the call applies is the object (call it \tcode{x}) under construction or destruction, the function called is the |
1428 | | -final overrider in the constructor’s or destructor’s class and not one overriding it in a more-derived class. |
| 1428 | +final overrider in the constructor's or destructor's class and not one overriding it in a more-derived class. |
1429 | 1429 | If the virtual function call uses an explicit class member access \iref{expr.ref} and the object expression refers |
1430 | | -to the complete object of \tcode{x} or one of that object’s base class subobjects but not \tcode{x} or one of its base class |
| 1430 | +to the complete object of \tcode{x} or one of that object's base class subobjects but not \tcode{x} or one of its base class |
1431 | 1431 | subobjects, the behavior is undefined. |
1432 | 1432 |
|
1433 | 1433 | \pnum |
|
1467 | 1467 | \ubxref{class.cdtor.typeid} \\ |
1468 | 1468 | If the operand of \tcode{typeid} refers to |
1469 | 1469 | the object under construction or destruction and the static type of the operand is neither the constructor or |
1470 | | -destructor’s class nor one of its bases, the behavior is undefined. |
| 1470 | +destructor's class nor one of its bases, the behavior is undefined. |
1471 | 1471 |
|
1472 | 1472 | \pnum |
1473 | 1473 | \begin{example} |
|
1498 | 1498 | \ubxref{class.cdtor.dynamic.cast} \\ |
1499 | 1499 | If the operand of the |
1500 | 1500 | \tcode{dynamic_cast} refers to the object under construction or destruction and the static type of the operand is |
1501 | | -not a pointer to or object of the constructor or destructor’s own class or one of its bases, the \tcode{dynamic_cast} |
| 1501 | +not a pointer to or object of the constructor or destructor's own class or one of its bases, the \tcode{dynamic_cast} |
1502 | 1502 | results in undefined behavior. |
1503 | 1503 |
|
1504 | 1504 | \pnum |
|
1668 | 1668 | \pnum |
1669 | 1669 | \begin{example} |
1670 | 1670 | \begin{codeblock} |
1671 | | -#define GUARD_NAME ï ## _GUARD // Undefined behavior, character sequence produced contains |
1672 | | - // a universal-character-name |
1673 | | -#define COLUMN ï ##_column // Undefined behavior, character sequence produced contains |
1674 | | - // a universal-character-name |
| 1671 | +#define GUARD_NAME ï ## _GUARD // undefined behavior, character sequence produced contains |
| 1672 | + // a \grammarterm{universal-character-name} |
| 1673 | +#define COLUMN ï ##_column // undefined behavior, character sequence produced contains |
| 1674 | + // a \grammarterm{universal-character-name} |
1675 | 1675 | \end{codeblock} |
1676 | 1676 | \end{example} |
1677 | 1677 |
|
|
0 commit comments