tmp/tmpahtl556p/{from.md → to.md}
RENAMED
|
@@ -4,27 +4,27 @@ The `sizeof` operator yields the number of bytes in the object
|
|
| 4 |
representation of its operand. The operand is either an expression,
|
| 5 |
which is an unevaluated operand (Clause [[expr]]), or a parenthesized
|
| 6 |
*type-id*. The `sizeof` operator shall not be applied to an expression
|
| 7 |
that has function or incomplete type, to an enumeration type whose
|
| 8 |
underlying type is not fixed before all its enumerators have been
|
| 9 |
-
declared, to the parenthesized name of such types, or to
|
| 10 |
designates a bit-field. `sizeof(char)`, `sizeof(signed char)` and
|
| 11 |
`sizeof(unsigned char)` are `1`. The result of `sizeof` applied to any
|
| 12 |
other fundamental type ([[basic.fundamental]]) is
|
| 13 |
*implementation-defined*. in particular, `sizeof(bool)`,
|
| 14 |
`sizeof(char16_t)`, `sizeof(char32_t)`, and `sizeof(wchar_t)` are
|
| 15 |
-
implementation-defined.[^
|
| 16 |
*byte* and [[basic.types]] for the definition of *object
|
| 17 |
representation*.
|
| 18 |
|
| 19 |
When applied to a reference or a reference type, the result is the size
|
| 20 |
of the referenced type. When applied to a class, the result is the
|
| 21 |
number of bytes in an object of that class including any padding
|
| 22 |
required for placing objects of that type in an array. The size of a
|
| 23 |
most derived class shall be greater than zero ([[intro.object]]). The
|
| 24 |
result of applying `sizeof` to a base class subobject is the size of the
|
| 25 |
-
base class type.[^
|
| 26 |
number of bytes in the array. This implies that the size of an array of
|
| 27 |
*n* elements is *n* times the size of an element.
|
| 28 |
|
| 29 |
The `sizeof` operator can be applied to a pointer to a function, but
|
| 30 |
shall not be applied directly to a function.
|
|
|
|
| 4 |
representation of its operand. The operand is either an expression,
|
| 5 |
which is an unevaluated operand (Clause [[expr]]), or a parenthesized
|
| 6 |
*type-id*. The `sizeof` operator shall not be applied to an expression
|
| 7 |
that has function or incomplete type, to an enumeration type whose
|
| 8 |
underlying type is not fixed before all its enumerators have been
|
| 9 |
+
declared, to the parenthesized name of such types, or to a glvalue that
|
| 10 |
designates a bit-field. `sizeof(char)`, `sizeof(signed char)` and
|
| 11 |
`sizeof(unsigned char)` are `1`. The result of `sizeof` applied to any
|
| 12 |
other fundamental type ([[basic.fundamental]]) is
|
| 13 |
*implementation-defined*. in particular, `sizeof(bool)`,
|
| 14 |
`sizeof(char16_t)`, `sizeof(char32_t)`, and `sizeof(wchar_t)` are
|
| 15 |
+
implementation-defined.[^16] See [[intro.memory]] for the definition of
|
| 16 |
*byte* and [[basic.types]] for the definition of *object
|
| 17 |
representation*.
|
| 18 |
|
| 19 |
When applied to a reference or a reference type, the result is the size
|
| 20 |
of the referenced type. When applied to a class, the result is the
|
| 21 |
number of bytes in an object of that class including any padding
|
| 22 |
required for placing objects of that type in an array. The size of a
|
| 23 |
most derived class shall be greater than zero ([[intro.object]]). The
|
| 24 |
result of applying `sizeof` to a base class subobject is the size of the
|
| 25 |
+
base class type.[^17] When applied to an array, the result is the total
|
| 26 |
number of bytes in the array. This implies that the size of an array of
|
| 27 |
*n* elements is *n* times the size of an element.
|
| 28 |
|
| 29 |
The `sizeof` operator can be applied to a pointer to a function, but
|
| 30 |
shall not be applied directly to a function.
|