From Jason Turner

[cpp.predefined]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpyp24l5ld/{from.md → to.md} +14 -7
tmp/tmpyp24l5ld/{from.md → to.md} RENAMED
@@ -1,13 +1,12 @@
1
  ## Predefined macro names <a id="cpp.predefined">[[cpp.predefined]]</a>
2
 
3
  The following macro names shall be defined by the implementation:
4
 
5
- - **`\texttt{__cplusplus}`**
6
 
7
- The name ` __cplusplus` is defined to the value `202302L` when compiling
8
- a C++translation unit.[^12]
9
 
10
  - **`__DATE__`**
11
 
12
  The date of translation of the source file: a character string literal
13
  of the form `"Mmm dd yyyy"`, where the names of the months are the same
@@ -17,24 +16,32 @@ translation is not available, an *implementation-defined* valid date
17
  shall be supplied.
18
 
19
  - **`__FILE__`**
20
 
21
  The presumed name of the current source file (a character string
22
- literal).[^13]
23
 
24
  - **`__LINE__`**
25
 
26
  The presumed line number (within the current source file) of the current
27
- source line (an integer literal).
28
-
29
-  
30
 
31
  - **`__STDC_HOSTED__`**
32
 
33
  The integer literal `1` if the implementation is a hosted implementation
34
  or the integer literal `0` if it is not.
35
 
 
 
 
 
 
 
 
 
 
 
36
  - **`__TIME__`**
37
 
38
  The time of translation of the source file: a character string literal
39
  of the form `"hh:mm:ss"` as in the time generated by the `asctime`
40
  function. If the time of translation is not available, an
 
1
  ## Predefined macro names <a id="cpp.predefined">[[cpp.predefined]]</a>
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
  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.
32
 
33
+ - **`__STDCPP_DEFAULT_NEW_ALIGNMENT__`**
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