Skip to content

Commit cc9580b

Browse files
committed
[basic.def.odr] Fix example to perform the lvalue-to-rvalue conversion
outside the conditional expression, as intended.
1 parent aaaf8ae commit cc9580b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/basic.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
\tcode{S::x} subexpression.
280280
\begin{codeblock}
281281
struct S { static const int x = 0; };
282-
int f(const int &r);
282+
const int &f(const int &r);
283283
int n = b ? (1, S::x) // \tcode{S::x} is not odr-used here
284284
: f(S::x); // \tcode{S::x} is odr-used here, so
285285
// a definition is required

0 commit comments

Comments
 (0)