File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 270270contains the potential results of the right operand.
271271\item Otherwise, the set is empty.
272272\end {itemize }
273+ \enternote
274+ This set is a (possibly-empty) set of \grammarterm {id-expression}{s},
275+ each of which is either \tcode {e} or a subexpression of \tcode {e}.
276+ \enterexample
277+ In the following example, the set of potential results of the initializer
278+ of \tcode {n} contains the first \tcode {S::x} subexpression, but not the second
279+ \tcode {S::x} subexpression.
280+ \begin {codeblock }
281+ struct S { static const int x = 0; };
282+ int f(const int &r);
283+ int n = b ? (1, S::x) // \tcode {S::x} is not odr-used here
284+ : f(S::x); // \tcode {S::x} is odr-used here, so
285+ // a definition is required
286+ \end {codeblock }
287+ \exitexample
288+ \exitnote
273289
274290\pnum
275291A variable \tcode {x} whose name appears as a
276- potentially-evaluated expression \tcode {ex} is \defn {odr-used} unless
292+ potentially-evaluated expression \tcode {ex} is \defn {odr-used} by \tcode {ex} unless
277293applying the lvalue-to-rvalue conversion (\ref {conv.lval }) to \tcode {x} yields
278294a constant expression~(\ref {expr.const }) that does not invoke any non-trivial
279295functions
You can’t perform that action at this time.
0 commit comments