Skip to content

Commit 94ef282

Browse files
committed
[over] Minor horizontal whitespace adjustment for comments
1 parent bcb8316 commit 94ef282

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

source/overloading.tex

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,8 +1466,8 @@
14661466
\begin{example}
14671467
\begin{codeblock}
14681468
template <class T> struct A {
1469-
explicit A(const T&, ...) noexcept; // \#1
1470-
A(T&&, ...); // \#2
1469+
explicit A(const T&, ...) noexcept; // \#1
1470+
A(T&&, ...); // \#2
14711471
};
14721472

14731473
int i;
@@ -1713,7 +1713,7 @@
17131713
};
17141714

17151715
int main() {
1716-
B b; // OK, \tcode{B::B()}
1716+
B b; // OK, \tcode{B::B()}
17171717
}
17181718
\end{codeblock}
17191719
\end{example}
@@ -2232,15 +2232,15 @@
22322232
\begin{codeblock}
22332233
struct A { int x, y; };
22342234
struct B { int y, x; };
2235-
void f(A a, int); // \#1
2236-
void f(B b, ...); // \#2
2237-
void g(A a); // \#3
2238-
void g(B b); // \#4
2235+
void f(A a, int); // \#1
2236+
void f(B b, ...); // \#2
2237+
void g(A a); // \#3
2238+
void g(B b); // \#4
22392239
void h() {
2240-
f({.x = 1, .y = 2}, 0); // OK; calls \#1
2241-
f({.y = 2, .x = 1}, 0); // error: selects \#1, initialization of \tcode{a} fails
2242-
// due to non-matching member order\iref{dcl.init.list}
2243-
g({.x = 1, .y = 2}); // error: ambiguous between \#3 and \#4
2240+
f({.x = 1, .y = 2}, 0); // OK; calls \#1
2241+
f({.y = 2, .x = 1}, 0); // error: selects \#1, initialization of \tcode{a} fails
2242+
// due to non-matching member order\iref{dcl.init.list}
2243+
g({.x = 1, .y = 2}); // error: ambiguous between \#3 and \#4
22442244
}
22452245
\end{codeblock}
22462246
\end{example}
@@ -2271,24 +2271,24 @@
22712271
the context of a call to an initializer-list constructor. \begin{example}
22722272
\begin{codeblock}
22732273
void f(std::initializer_list<int>);
2274-
f( {} ); // OK: \tcode{f(initializer_list<int>)} identity conversion
2275-
f( {1,2,3} ); // OK: \tcode{f(initializer_list<int>)} identity conversion
2276-
f( {'a','b'} ); // OK: \tcode{f(initializer_list<int>)} integral promotion
2277-
f( {1.0} ); // error: narrowing
2274+
f( {} ); // OK: \tcode{f(initializer_list<int>)} identity conversion
2275+
f( {1,2,3} ); // OK: \tcode{f(initializer_list<int>)} identity conversion
2276+
f( {'a','b'} ); // OK: \tcode{f(initializer_list<int>)} integral promotion
2277+
f( {1.0} ); // error: narrowing
22782278

22792279
struct A {
22802280
A(std::initializer_list<double>); // \#1
22812281
A(std::initializer_list<complex<double>>); // \#2
22822282
A(std::initializer_list<std::string>); // \#3
22832283
};
2284-
A a{ 1.0,2.0 }; // OK, uses \#1
2284+
A a{ 1.0,2.0 }; // OK, uses \#1
22852285

22862286
void g(A);
2287-
g({ "foo", "bar" }); // OK, uses \#3
2287+
g({ "foo", "bar" }); // OK, uses \#3
22882288

22892289
typedef int IA[3];
22902290
void h(const IA&);
2291-
h({ 1, 2, 3 }); // OK: identity conversion
2291+
h({ 1, 2, 3 }); // OK: identity conversion
22922292
\end{codeblock}
22932293
\end{example}
22942294

@@ -3304,9 +3304,9 @@
33043304
Z operator[](std::initializer_list<int>);
33053305
};
33063306
X x;
3307-
x[{1,2,3}] = 7; // OK: meaning \tcode{x.operator[](\{1,2,3\})}
3307+
x[{1,2,3}] = 7; // OK: meaning \tcode{x.operator[](\{1,2,3\})}
33083308
int a[10];
3309-
a[{1,2,3}] = 7; // error: built-in subscript operator
3309+
a[{1,2,3}] = 7; // error: built-in subscript operator
33103310
\end{codeblock}
33113311
\end{example}
33123312

0 commit comments

Comments
 (0)