tmp/tmpj4m3gu7t/{from.md → to.md}
RENAMED
|
@@ -5,38 +5,43 @@ any member of the implementation’s basic character set. If a character
|
|
| 5 |
from this set is stored in a character object, the integral value of
|
| 6 |
that character object is equal to the value of the single character
|
| 7 |
literal form of that character. It is *implementation-defined* whether a
|
| 8 |
`char` object can hold negative values. Characters can be explicitly
|
| 9 |
declared `unsigned` or `signed`. Plain `char`, `signed char`, and
|
| 10 |
-
`unsigned char` are three distinct types
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
representation participate in the value representation. For unsigned
|
| 15 |
-
character types, all possible bit patterns of the value
|
| 16 |
-
represent numbers. These requirements do not hold for
|
| 17 |
-
any particular implementation, a plain `char` object can
|
| 18 |
-
the same values as a `signed char` or an `unsigned
|
| 19 |
-
char`; which one is *implementation-defined*.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
There are five *standard signed integer types* : “`signed char`”,
|
| 22 |
“`short int`”, “`int`”, “`long int`”, and “`long` `long` `int`”. In this
|
| 23 |
list, each type provides at least as much storage as those preceding it
|
| 24 |
in the list. There may also be *implementation-defined* *extended signed
|
| 25 |
integer types*. The standard and extended signed integer types are
|
| 26 |
collectively called *signed integer types*. Plain `int`s have the
|
| 27 |
natural size suggested by the architecture of the execution
|
| 28 |
-
environment[^
|
| 29 |
special needs.
|
| 30 |
|
| 31 |
For each of the standard signed integer types, there exists a
|
| 32 |
corresponding (but different) *standard unsigned integer type*:
|
| 33 |
“`unsigned char`”, “`unsigned short int`”, “`unsigned int`”,
|
| 34 |
“`unsigned long int`”, and “`unsigned` `long` `long` `int`”, each of
|
| 35 |
which occupies the same amount of storage and has the same alignment
|
| 36 |
requirements ([[basic.align]]) as the corresponding signed integer
|
| 37 |
-
type[^
|
| 38 |
representation as its corresponding unsigned integer type. Likewise, for
|
| 39 |
each of the extended signed integer types there exists a corresponding
|
| 40 |
*extended unsigned integer type* with the same amount of storage and
|
| 41 |
alignment requirements. The standard and extended unsigned integer types
|
| 42 |
are collectively called *unsigned integer types*. The range of
|
|
@@ -44,34 +49,36 @@ non-negative values of a *signed integer* type is a subrange of the
|
|
| 44 |
corresponding *unsigned integer* type, and the value representation of
|
| 45 |
each corresponding signed/unsigned type shall be the same. The standard
|
| 46 |
signed integer types and standard unsigned integer types are
|
| 47 |
collectively called the *standard integer types*, and the extended
|
| 48 |
signed integer types and extended unsigned integer types are
|
| 49 |
-
collectively called the *extended integer types*.
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
Unsigned integers
|
| 52 |
-
|
| 53 |
-
|
| 54 |
|
| 55 |
Type `wchar_t` is a distinct type whose values can represent distinct
|
| 56 |
codes for all members of the largest extended character set specified
|
| 57 |
among the supported locales ([[locale]]). Type `wchar_t` shall have the
|
| 58 |
same size, signedness, and alignment requirements ([[basic.align]]) as
|
| 59 |
one of the other integral types, called its *underlying type*. Types
|
| 60 |
`char16_t` and `char32_t` denote distinct types with the same size,
|
| 61 |
signedness, and alignment as `uint_least16_t` and `uint_least32_t`,
|
| 62 |
-
respectively, in `<
|
| 63 |
|
| 64 |
-
Values of type `bool` are either `true` or `false`.[^
|
| 65 |
`signed`, `unsigned`, `short`, or `long bool` types or values. Values of
|
| 66 |
type `bool` participate in integral promotions ([[conv.prom]]).
|
| 67 |
|
| 68 |
Types `bool`, `char`, `char16_t`, `char32_t`, `wchar_t`, and the signed
|
| 69 |
and unsigned integer types are collectively called *integral*
|
| 70 |
-
types.[^
|
| 71 |
representations of integral types shall define values by use of a pure
|
| 72 |
-
binary numeration system.[^
|
| 73 |
complement, 1’s complement and signed magnitude representations for
|
| 74 |
integral types.
|
| 75 |
|
| 76 |
There are three *floating point* types: `float`, `double`, and
|
| 77 |
`long double`. The type `double` provides at least as much precision as
|
|
@@ -91,13 +98,13 @@ incomplete type that cannot be completed. It is used as the return type
|
|
| 91 |
for functions that do not return a value. Any expression can be
|
| 92 |
explicitly converted to type *cv* `void` ([[expr.cast]]). An expression
|
| 93 |
of type `void` shall be used only as an expression statement (
|
| 94 |
[[stmt.expr]]), as an operand of a comma expression ([[expr.comma]]),
|
| 95 |
as a second or third operand of `?:` ([[expr.cond]]), as the operand of
|
| 96 |
-
`typeid` or `decltype`, as the expression in a return
|
| 97 |
-
[[stmt.return]]) for a function with the return type `void`,
|
| 98 |
-
operand of an explicit conversion to type cv `void`.
|
| 99 |
|
| 100 |
A value of type `std::nullptr_t` is a null pointer constant (
|
| 101 |
[[conv.ptr]]). Such values participate in the pointer and the pointer to
|
| 102 |
member conversions ([[conv.ptr]], [[conv.mem]]).
|
| 103 |
`sizeof(std::nullptr_t)` shall be equal to `sizeof(void*)`.
|
|
|
|
| 5 |
from this set is stored in a character object, the integral value of
|
| 6 |
that character object is equal to the value of the single character
|
| 7 |
literal form of that character. It is *implementation-defined* whether a
|
| 8 |
`char` object can hold negative values. Characters can be explicitly
|
| 9 |
declared `unsigned` or `signed`. Plain `char`, `signed char`, and
|
| 10 |
+
`unsigned char` are three distinct types, collectively called *narrow
|
| 11 |
+
character types*. A `char`, a `signed char`, and an `unsigned char`
|
| 12 |
+
occupy the same amount of storage and have the same alignment
|
| 13 |
+
requirements ([[basic.align]]); that is, they have the same object
|
| 14 |
+
representation. For narrow character types, all bits of the object
|
| 15 |
representation participate in the value representation. For unsigned
|
| 16 |
+
narrow character types, all possible bit patterns of the value
|
| 17 |
+
representation represent numbers. These requirements do not hold for
|
| 18 |
+
other types. In any particular implementation, a plain `char` object can
|
| 19 |
+
take on either the same values as a `signed char` or an `unsigned
|
| 20 |
+
char`; which one is *implementation-defined*. For each value *i* of type
|
| 21 |
+
`unsigned char` in the range 0 to 255 inclusive, there exists a value
|
| 22 |
+
*j* of type `char` such that the result of an integral conversion (
|
| 23 |
+
[[conv.integral]]) from *i* to `char` is *j*, and the result of an
|
| 24 |
+
integral conversion from *j* to `unsigned char` is *i*.
|
| 25 |
|
| 26 |
There are five *standard signed integer types* : “`signed char`”,
|
| 27 |
“`short int`”, “`int`”, “`long int`”, and “`long` `long` `int`”. In this
|
| 28 |
list, each type provides at least as much storage as those preceding it
|
| 29 |
in the list. There may also be *implementation-defined* *extended signed
|
| 30 |
integer types*. The standard and extended signed integer types are
|
| 31 |
collectively called *signed integer types*. Plain `int`s have the
|
| 32 |
natural size suggested by the architecture of the execution
|
| 33 |
+
environment[^22]; the other signed integer types are provided to meet
|
| 34 |
special needs.
|
| 35 |
|
| 36 |
For each of the standard signed integer types, there exists a
|
| 37 |
corresponding (but different) *standard unsigned integer type*:
|
| 38 |
“`unsigned char`”, “`unsigned short int`”, “`unsigned int`”,
|
| 39 |
“`unsigned long int`”, and “`unsigned` `long` `long` `int`”, each of
|
| 40 |
which occupies the same amount of storage and has the same alignment
|
| 41 |
requirements ([[basic.align]]) as the corresponding signed integer
|
| 42 |
+
type[^23]; that is, each signed integer type has the same object
|
| 43 |
representation as its corresponding unsigned integer type. Likewise, for
|
| 44 |
each of the extended signed integer types there exists a corresponding
|
| 45 |
*extended unsigned integer type* with the same amount of storage and
|
| 46 |
alignment requirements. The standard and extended unsigned integer types
|
| 47 |
are collectively called *unsigned integer types*. The range of
|
|
|
|
| 49 |
corresponding *unsigned integer* type, and the value representation of
|
| 50 |
each corresponding signed/unsigned type shall be the same. The standard
|
| 51 |
signed integer types and standard unsigned integer types are
|
| 52 |
collectively called the *standard integer types*, and the extended
|
| 53 |
signed integer types and extended unsigned integer types are
|
| 54 |
+
collectively called the *extended integer types*. The signed and
|
| 55 |
+
unsigned integer types shall satisfy the constraints given in the C
|
| 56 |
+
standard, section 5.2.4.2.1.
|
| 57 |
|
| 58 |
+
Unsigned integers shall obey the laws of arithmetic modulo 2ⁿ where n is
|
| 59 |
+
the number of bits in the value representation of that particular size
|
| 60 |
+
of integer.[^24]
|
| 61 |
|
| 62 |
Type `wchar_t` is a distinct type whose values can represent distinct
|
| 63 |
codes for all members of the largest extended character set specified
|
| 64 |
among the supported locales ([[locale]]). Type `wchar_t` shall have the
|
| 65 |
same size, signedness, and alignment requirements ([[basic.align]]) as
|
| 66 |
one of the other integral types, called its *underlying type*. Types
|
| 67 |
`char16_t` and `char32_t` denote distinct types with the same size,
|
| 68 |
signedness, and alignment as `uint_least16_t` and `uint_least32_t`,
|
| 69 |
+
respectively, in `<cstdint>`, called the underlying types.
|
| 70 |
|
| 71 |
+
Values of type `bool` are either `true` or `false`.[^25] There are no
|
| 72 |
`signed`, `unsigned`, `short`, or `long bool` types or values. Values of
|
| 73 |
type `bool` participate in integral promotions ([[conv.prom]]).
|
| 74 |
|
| 75 |
Types `bool`, `char`, `char16_t`, `char32_t`, `wchar_t`, and the signed
|
| 76 |
and unsigned integer types are collectively called *integral*
|
| 77 |
+
types.[^26] A synonym for integral type is *integer type*. The
|
| 78 |
representations of integral types shall define values by use of a pure
|
| 79 |
+
binary numeration system.[^27] this International Standard permits 2’s
|
| 80 |
complement, 1’s complement and signed magnitude representations for
|
| 81 |
integral types.
|
| 82 |
|
| 83 |
There are three *floating point* types: `float`, `double`, and
|
| 84 |
`long double`. The type `double` provides at least as much precision as
|
|
|
|
| 98 |
for functions that do not return a value. Any expression can be
|
| 99 |
explicitly converted to type *cv* `void` ([[expr.cast]]). An expression
|
| 100 |
of type `void` shall be used only as an expression statement (
|
| 101 |
[[stmt.expr]]), as an operand of a comma expression ([[expr.comma]]),
|
| 102 |
as a second or third operand of `?:` ([[expr.cond]]), as the operand of
|
| 103 |
+
`typeid`, `noexcept`, or `decltype`, as the expression in a return
|
| 104 |
+
statement ([[stmt.return]]) for a function with the return type `void`,
|
| 105 |
+
or as the operand of an explicit conversion to type cv `void`.
|
| 106 |
|
| 107 |
A value of type `std::nullptr_t` is a null pointer constant (
|
| 108 |
[[conv.ptr]]). Such values participate in the pointer and the pointer to
|
| 109 |
member conversions ([[conv.ptr]], [[conv.mem]]).
|
| 110 |
`sizeof(std::nullptr_t)` shall be equal to `sizeof(void*)`.
|