Skip to content

Commit bbd5de2

Browse files
committed
[dcl.decl] Minor horizontal whitespace harmonization
1 parent e3b4927 commit bbd5de2

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

source/declarators.tex

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3772,19 +3772,19 @@
37723772
Banana &&banana3 = Alaska(); // ill-formed
37733773
}
37743774

3775-
const double& rcd2 = 2; // \tcode{rcd2} refers to temporary with value \tcode{2.0}
3776-
double&& rrd = 2; // \tcode{rrd} refers to temporary with value \tcode{2.0}
3775+
const double& rcd2 = 2; // \tcode{rcd2} refers to temporary with value \tcode{2.0}
3776+
double&& rrd = 2; // \tcode{rrd} refers to temporary with value \tcode{2.0}
37773777
const volatile int cvi = 1;
3778-
const int& r2 = cvi; // error: cv-qualifier dropped
3778+
const int& r2 = cvi; // error: cv-qualifier dropped
37793779
struct A { operator volatile int&(); } a;
3780-
const int& r3 = a; // error: cv-qualifier dropped
3781-
// from result of conversion function
3780+
const int& r3 = a; // error: cv-qualifier dropped
3781+
// from result of conversion function
37823782
double d2 = 1.0;
3783-
double&& rrd2 = d2; // error: initializer is lvalue of related type
3783+
double&& rrd2 = d2; // error: initializer is lvalue of related type
37843784
struct X { operator int&(); };
3785-
int&& rri2 = X(); // error: result of conversion function is lvalue of related type
3785+
int&& rri2 = X(); // error: result of conversion function is lvalue of related type
37863786
int i3 = 2;
3787-
double&& rrd3 = i3; // \tcode{rrd3} refers to temporary with value \tcode{2.0}
3787+
double&& rrd3 = i3; // \tcode{rrd3} refers to temporary with value \tcode{2.0}
37883788
\end{codeblock}
37893789
\end{example}
37903790
\end{itemize}
@@ -3880,8 +3880,8 @@
38803880
\begin{example}
38813881
\begin{codeblock}
38823882
struct A { int x; int y; int z; };
3883-
A a{.y = 2, .x = 1}; // error: designator order does not match declaration order
3884-
A b{.x = 1, .z = 2}; // OK, \tcode{b.y} initialized to \tcode{0}
3883+
A a{.y = 2, .x = 1}; // error: designator order does not match declaration order
3884+
A b{.x = 1, .z = 2}; // OK, \tcode{b.y} initialized to \tcode{0}
38853885
\end{codeblock}
38863886
\end{example}
38873887

@@ -4126,7 +4126,7 @@
41264126

41274127
struct A {
41284128
std::initializer_list<int> i4;
4129-
A() : i4{ 1, 2, 3 } {} // ill-formed, would create a dangling reference
4129+
A() : i4{ 1, 2, 3 } {} // ill-formed, would create a dangling reference
41304130
};
41314131
\end{codeblock}
41324132

@@ -4172,24 +4172,23 @@
41724172
list-initializations.\end{note} \begin{example}
41734173

41744174
\begin{codeblock}
4175-
int x = 999; // \tcode{x} is not a constant expression
4175+
int x = 999; // \tcode{x} is not a constant expression
41764176
const int y = 999;
41774177
const int z = 99;
4178-
char c1 = x; // OK, though it might narrow (in this case, it does narrow)
4179-
char c2{x}; // error: might narrow
4180-
char c3{y}; // error: narrows (assuming \tcode{char} is 8 bits)
4181-
char c4{z}; // OK: no narrowing needed
4182-
unsigned char uc1 = {5}; // OK: no narrowing needed
4183-
unsigned char uc2 = {-1}; // error: narrows
4184-
unsigned int ui1 = {-1}; // error: narrows
4178+
char c1 = x; // OK, though it might narrow (in this case, it does narrow)
4179+
char c2{x}; // error: might narrow
4180+
char c3{y}; // error: narrows (assuming \tcode{char} is 8 bits)
4181+
char c4{z}; // OK: no narrowing needed
4182+
unsigned char uc1 = {5}; // OK: no narrowing needed
4183+
unsigned char uc2 = {-1}; // error: narrows
4184+
unsigned int ui1 = {-1}; // error: narrows
41854185
signed int si1 =
4186-
{ (unsigned int)-1 }; // error: narrows
4187-
int ii = {2.0}; // error: narrows
4188-
float f1 { x }; // error: might narrow
4189-
float f2 { 7 }; // OK: 7 can be exactly represented as a \tcode{float}
4186+
{ (unsigned int)-1 }; // error: narrows
4187+
int ii = {2.0}; // error: narrows
4188+
float f1 { x }; // error: might narrow
4189+
float f2 { 7 }; // OK: 7 can be exactly represented as a \tcode{float}
41904190
int f(int);
4191-
int a[] =
4192-
{ 2, f(2), f(2.0) }; // OK: the \tcode{double}-to-\tcode{int} conversion is not at the top level
4191+
int a[] = { 2, f(2), f(2.0) }; // OK: the \tcode{double}-to-\tcode{int} conversion is not at the top level
41934192
\end{codeblock}
41944193
\end{example}%
41954194
\indextext{initialization!list-initialization|)}%

0 commit comments

Comments
 (0)