File tree Expand file tree Collapse file tree 5 files changed +39
-7
lines changed Expand file tree Collapse file tree 5 files changed +39
-7
lines changed Original file line number Diff line number Diff line change 5576
5576
\item
5577
5577
The constituent expression of an expression is that expression.
5578
5578
\item
5579
+ The constituent expression of a conversion is
5580
+ the corresponding implicit function call, if any, or
5581
+ the converted expression otherwise.
5582
+ \item
5579
5583
The constituent expressions of a \grammarterm {braced-init-list} or
5580
5584
of a (possibly parenthesized) \grammarterm {expression-list}
5581
5585
are the constituent expressions of the elements of the respective list.
5623
5627
Expressions appearing in the \grammarterm {compound-statement} of a \grammarterm {lambda-expression}
5624
5628
are not subexpressions of the \grammarterm {lambda-expression}.
5625
5629
\end {note }
5630
+ % FIXME: We never define "potentially-evaluated expression".
5631
+ The \defnadjx {potentially-evaluated}{subexpressions}{subexpression} of
5632
+ an expression, conversion, or \grammarterm {initializer} $ E$ are
5633
+ \begin {itemize }
5634
+ \item
5635
+ the constituent expressions of $ E$ and
5636
+ \item
5637
+ the subexpressions thereof that
5638
+ are not subexpressions of a nested unevaluated operand\iref {expr.context }.
5639
+ \end {itemize }
5626
5640
5627
5641
\pnum
5628
5642
A \defn {full-expression} is
Original file line number Diff line number Diff line change 660
660
shall not directly or indirectly cause the implicit definition of a
661
661
defaulted default constructor for the enclosing class or the
662
662
exception specification of that constructor.
663
+ An immediate invocation\iref {expr.const } that
664
+ is a potentially-evaluated subexpression\iref {intro.execution }
665
+ of a default member initializer
666
+ is neither evaluated nor checked for whether it
667
+ is a constant expression at the point where the subexpression appears.
663
668
664
669
\pnum
665
670
A member shall not be declared with the \keyword {extern}
Original file line number Diff line number Diff line change 3992
3992
copy-initialization semantics\iref {dcl.init }.
3993
3993
The names in the
3994
3994
default argument are looked up, and the semantic constraints are checked,
3995
- at the point where the default argument appears.
3995
+ at the point where the default argument appears, except that
3996
+ an immediate invocation\iref {expr.const } that
3997
+ is a potentially-evaluated subexpression\iref {intro.execution } of
3998
+ the \grammarterm {initializer-clause} in a \grammarterm {parameter-declaration} is
3999
+ neither evaluated
4000
+ nor checked for whether it is a constant expression at that point.
3996
4001
Name lookup and checking of semantic constraints for default
3997
4002
arguments of templated functions are performed as described in~\ref {temp.inst }.
3998
4003
\begin {example }
4671
4676
\end {note }
4672
4677
\end {itemize }
4673
4678
4679
+ \pnum
4680
+ An immediate invocation\iref {expr.const } that is not evaluated where
4681
+ it appears\iref {dcl.fct.default,class.mem.general }
4682
+ is evaluated and checked for whether it is
4683
+ a constant expression at the point where
4684
+ the enclosing initializer is used in
4685
+ a function call, a constructor definition, or an aggregate initialization.
4686
+
4674
4687
\pnum
4675
4688
An \grammarterm {initializer-clause} followed by an ellipsis is a
4676
4689
pack expansion\iref {temp.variadic }.
Original file line number Diff line number Diff line change 7910
7910
or
7911
7911
7912
7912
\item
7913
- a subexpression of one of the above
7914
- that is not a subexpression of a nested unevaluated operand\iref {term.unevaluated.operand }.
7913
+ a potentially-evaluated subexpression of one of the above.
7915
7914
\end {itemize }
7916
7915
7917
7916
\indextext {function!needed for constant evaluation}%
Original file line number Diff line number Diff line change 5956
5956
It is unspecified whether or not an implementation implicitly instantiates a
5957
5957
virtual member function of a class template if the virtual member function would
5958
5958
not otherwise be instantiated.
5959
- The use of a template specialization in a default argument
5960
- shall not cause the template to be implicitly instantiated except that a
5961
- class template may be instantiated where its complete type is needed to determine
5962
- the correctness of the default argument.
5959
+ The use of a template specialization in
5960
+ a default argument or default member initializer
5961
+ shall not cause the template to be implicitly instantiated except
5962
+ where needed to determine
5963
+ the correctness of the default argument or default member initializer.
5963
5964
The use of a default argument in a
5964
5965
function call causes specializations in the default argument to be implicitly
5965
5966
instantiated.
You can’t perform that action at this time.
0 commit comments