From Jason Turner

[diff.cpp11.lex]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpaep1vx01/{from.md → to.md} +10 -10
tmp/tmpaep1vx01/{from.md → to.md} RENAMED
@@ -1,18 +1,18 @@
1
- ### Clause [[lex]]: lexical conventions <a id="diff.cpp11.lex">[[diff.cpp11.lex]]</a>
2
 
3
- [[lex.ppnumber]] **Change:** *pp-number* can contain one or more single
4
- quotes. **Rationale:** Necessary to enable single quotes as digit
5
- separators. **Effect on original feature:** Valid C++11code may fail to
6
- compile or may change meaning in this International Standard. For
7
- example, the following code is valid both in C++11and in this
8
- International Standard, but the macro invocation produces different
9
- outcomes because the single quotes delimit a character literal in C++11,
10
- whereas they are digit separators in this International Standard:
11
 
12
  ``` cpp
13
  #define M(x, ...) __VA_ARGS__
14
  int x[2] = { M(1'2,3'4, 5) };
15
- // int x[2] = { 5 \ \ \ \ \ } --- C++11
16
  // int x[2] = { 3'4, 5 } --- this International Standard
17
  ```
18
 
 
1
+ ### [[lex]]: lexical conventions <a id="diff.cpp11.lex">[[diff.cpp11.lex]]</a>
2
 
3
+ **Change:** *pp-number* can contain one or more single quotes.
4
+ **Rationale:** Necessary to enable single quotes as digit separators.
5
+ **Effect on original feature:** Valid C++11 code may fail to compile or
6
+ may change meaning in this International Standard. For example, the
7
+ following code is valid both in C++11 and in this International
8
+ Standard, but the macro invocation produces different outcomes because
9
+ the single quotes delimit a *character-literal* in C++11, whereas they
10
+ are digit separators in this International Standard:
11
 
12
  ``` cpp
13
  #define M(x, ...) __VA_ARGS__
14
  int x[2] = { M(1'2,3'4, 5) };
15
+ // int x[2] = { 5 \ \ \ \ \ } --- C++11{}
16
  // int x[2] = { 3'4, 5 } --- this International Standard
17
  ```
18