From Jason Turner

[cpp.predefined]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpv2sd6a2q/{from.md → to.md} +88 -13
tmp/tmpv2sd6a2q/{from.md → to.md} RENAMED
@@ -2,11 +2,15 @@
2
 
3
  The following macro names shall be defined by the implementation:
4
 
5
  - **`__cplusplus`**
6
 
7
- The integer literal `202302L`.[^9]
 
 
 
 
8
 
9
  - **`__DATE__`**
10
 
11
  The date of translation of the source file: a character string literal
12
  of the form `"Mmm dd yyyy"`, where the names of the months are the same
@@ -16,16 +20,16 @@ translation is not available, an *implementation-defined* valid date
16
  shall be supplied.
17
 
18
  - **`__FILE__`**
19
 
20
  The presumed name of the current source file (a character string
21
- literal). [^10]
22
 
23
  - **`__LINE__`**
24
 
25
  The presumed line number (within the current source file) of the current
26
- source line (an integer literal). [^11]
27
 
28
  - **`__STDC_HOSTED__`**
29
 
30
  The integer literal `1` if the implementation is a hosted implementation
31
  or the integer literal `0` if it is not.
@@ -34,21 +38,93 @@ or the integer literal `0` if it is not.
34
 
35
  An integer literal of type `std::size_t` whose value is the alignment
36
  guaranteed by a call to `operator new(std::size_t)` or
37
  `operator new[](std::size_t)`.
38
 
39
- [*Note 1*: Larger alignments will be passed to
40
- `operator new(std::size_t, std::align_val_t)`, etc. (
41
- [[expr.new]]). — *end note*]
42
 
43
  - **`__TIME__`**
44
 
45
  The time of translation of the source file: a character string literal
46
  of the form `"hh:mm:ss"` as in the time generated by the `asctime`
47
  function. If the time of translation is not available, an
48
  *implementation-defined* valid time shall be supplied.
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  The following macro names are conditionally defined by the
51
  implementation:
52
 
53
  - **`__STDC__`**
54
 
@@ -70,25 +146,24 @@ are *implementation-defined*.
70
  - **`__STDC_ISO_10646__`**
71
 
72
  An integer literal of the form `yyyymmL` (for example, `199712L`). If
73
  this symbol is defined, then every character in the Unicode required
74
  set, when stored in an object of type `wchar_t`, has the same value as
75
- the short identifier of that character. The *Unicode required set*
76
- consists of all the characters that are defined by ISO/IEC 10646, along
77
- with all amendments and technical corrigenda as of the specified year
78
- and month.
79
 
80
  - **`__STDCPP_STRICT_POINTER_SAFETY__`**
81
 
82
  Defined, and has the value integer literal 1, if and only if the
83
- implementation has strict pointer safety (
84
- [[basic.stc.dynamic.safety]]).
85
 
86
  - **`__STDCPP_THREADS__`**
87
 
88
  Defined, and has the value integer literal 1, if and only if a program
89
- can have more than one thread of execution ([[intro.multithread]]).
90
 
91
  The values of the predefined macros (except for `__FILE__` and
92
  `__LINE__`) remain constant throughout the translation unit.
93
 
94
  If any of the pre-defined macro names in this subclause, or the
 
2
 
3
  The following macro names shall be defined by the implementation:
4
 
5
  - **`__cplusplus`**
6
 
7
+ The integer literal `202302L`.
8
+
9
+ [*Note 1*: It is intended that future versions of this International
10
+ Standard will replace the value of this macro with a greater
11
+ value. — *end note*]
12
 
13
  - **`__DATE__`**
14
 
15
  The date of translation of the source file: a character string literal
16
  of the form `"Mmm dd yyyy"`, where the names of the months are the same
 
20
  shall be supplied.
21
 
22
  - **`__FILE__`**
23
 
24
  The presumed name of the current source file (a character string
25
+ literal). [^9]
26
 
27
  - **`__LINE__`**
28
 
29
  The presumed line number (within the current source file) of the current
30
+ source line (an integer literal). [^10]
31
 
32
  - **`__STDC_HOSTED__`**
33
 
34
  The integer literal `1` if the implementation is a hosted implementation
35
  or the integer literal `0` if it is not.
 
38
 
39
  An integer literal of type `std::size_t` whose value is the alignment
40
  guaranteed by a call to `operator new(std::size_t)` or
41
  `operator new[](std::size_t)`.
42
 
43
+ [*Note 2*: Larger alignments will be passed to
44
+ `operator new(std::size_t, std::align_val_t)`, etc.
45
+ [[expr.new]]. — *end note*]
46
 
47
  - **`__TIME__`**
48
 
49
  The time of translation of the source file: a character string literal
50
  of the form `"hh:mm:ss"` as in the time generated by the `asctime`
51
  function. If the time of translation is not available, an
52
  *implementation-defined* valid time shall be supplied.
53
 
54
+ - **The names listed in [[cpp.predefined.ft]].**
55
+
56
+ The macros defined in [[cpp.predefined.ft]] shall be defined to the
57
+ corresponding integer literal.
58
+
59
+ [*Note 3*: Future versions of this International Standard might replace
60
+ the values of these macros with greater values. — *end note*]
61
+
62
+ **Table: Feature-test macros** <a id="cpp.predefined.ft">[cpp.predefined.ft]</a>
63
+
64
+ | Macro name | Value |
65
+ | --------------------------------------- | --------- |
66
+ | `__cpp_aggregate_bases` | `201603L` |
67
+ | `__cpp_aggregate_nsdmi` | `201304L` |
68
+ | `__cpp_aggregate_paren_init` | `201902L` |
69
+ | `__cpp_alias_templates` | `200704L` |
70
+ | `__cpp_aligned_new` | `201606L` |
71
+ | `__cpp_attributes` | `200809L` |
72
+ | `__cpp_binary_literals` | `201304L` |
73
+ | `__cpp_capture_star_this` | `201603L` |
74
+ | `__cpp_char8_t` | `201811L` |
75
+ | `__cpp_concepts` | `201907L` |
76
+ | `__cpp_conditional_explicit` | `201806L` |
77
+ | `__cpp_constexpr` | `201907L` |
78
+ | `__cpp_constexpr_dynamic_alloc` | `201907L` |
79
+ | `__cpp_constexpr_in_decltype` | `201711L` |
80
+ | `__cpp_consteval` | `201811L` |
81
+ | `__cpp_constinit` | `201907L` |
82
+ | `__cpp_decltype` | `200707L` |
83
+ | `__cpp_decltype_auto` | `201304L` |
84
+ | `__cpp_deduction_guides` | `201907L` |
85
+ | `__cpp_delegating_constructors` | `200604L` |
86
+ | `__cpp_designated_initializers` | `201707L` |
87
+ | `__cpp_enumerator_attributes` | `201411L` |
88
+ | `__cpp_fold_expressions` | `201603L` |
89
+ | `__cpp_generic_lambdas` | `201707L` |
90
+ | `__cpp_guaranteed_copy_elision` | `201606L` |
91
+ | `__cpp_hex_float` | `201603L` |
92
+ | `__cpp_if_constexpr` | `201606L` |
93
+ | `__cpp_impl_coroutine` | `201902L` |
94
+ | `__cpp_impl_destroying_delete` | `201806L` |
95
+ | `__cpp_impl_three_way_comparison` | `201907L` |
96
+ | `__cpp_inheriting_constructors` | `201511L` |
97
+ | `__cpp_init_captures` | `201803L` |
98
+ | `__cpp_initializer_lists` | `200806L` |
99
+ | `__cpp_inline_variables` | `201606L` |
100
+ | `__cpp_lambdas` | `200907L` |
101
+ | `__cpp_modules` | `201907L` |
102
+ | `__cpp_namespace_attributes` | `201411L` |
103
+ | `__cpp_noexcept_function_type` | `201510L` |
104
+ | `__cpp_nontype_template_args` | `201911L` |
105
+ | `__cpp_nontype_template_parameter_auto` | `201606L` |
106
+ | `__cpp_nsdmi` | `200809L` |
107
+ | `__cpp_range_based_for` | `201603L` |
108
+ | `__cpp_raw_strings` | `200710L` |
109
+ | `__cpp_ref_qualifiers` | `200710L` |
110
+ | `__cpp_return_type_deduction` | `201304L` |
111
+ | `__cpp_rvalue_references` | `200610L` |
112
+ | `__cpp_sized_deallocation` | `201309L` |
113
+ | `__cpp_static_assert` | `201411L` |
114
+ | `__cpp_structured_bindings` | `201606L` |
115
+ | `__cpp_template_template_args` | `201611L` |
116
+ | `__cpp_threadsafe_static_init` | `200806L` |
117
+ | `__cpp_unicode_characters` | `200704L` |
118
+ | `__cpp_unicode_literals` | `200710L` |
119
+ | `__cpp_user_defined_literals` | `200809L` |
120
+ | `__cpp_using_enum` | `201907L` |
121
+ | `__cpp_variable_templates` | `201304L` |
122
+ | `__cpp_variadic_templates` | `200704L` |
123
+ | `__cpp_variadic_using` | `201611L` |
124
+
125
+
126
  The following macro names are conditionally defined by the
127
  implementation:
128
 
129
  - **`__STDC__`**
130
 
 
146
  - **`__STDC_ISO_10646__`**
147
 
148
  An integer literal of the form `yyyymmL` (for example, `199712L`). If
149
  this symbol is defined, then every character in the Unicode required
150
  set, when stored in an object of type `wchar_t`, has the same value as
151
+ the code point of that character. The *Unicode required set* consists of
152
+ all the characters that are defined by ISO/IEC 10646, along with all
153
+ amendments and technical corrigenda as of the specified year and month.
 
154
 
155
  - **`__STDCPP_STRICT_POINTER_SAFETY__`**
156
 
157
  Defined, and has the value integer literal 1, if and only if the
158
+ implementation has strict pointer safety
159
+ [[basic.stc.dynamic.safety]].
160
 
161
  - **`__STDCPP_THREADS__`**
162
 
163
  Defined, and has the value integer literal 1, if and only if a program
164
+ can have more than one thread of execution [[intro.multithread]].
165
 
166
  The values of the predefined macros (except for `__FILE__` and
167
  `__LINE__`) remain constant throughout the translation unit.
168
 
169
  If any of the pre-defined macro names in this subclause, or the