File tree 5 files changed +41
-7
lines changed
5 files changed +41
-7
lines changed Original file line number Diff line number Diff line change 5585
5585
\item
5586
5586
The constituent expression of an expression is that expression.
5587
5587
\item
5588
+ The constituent expression of a conversion is
5589
+ the corresponding implicit function call, if any, or
5590
+ the converted expression otherwise.
5591
+ \item
5588
5592
The constituent expressions of a \grammarterm {braced-init-list} or
5589
5593
of a (possibly parenthesized) \grammarterm {expression-list}
5590
5594
are the constituent expressions of the elements of the respective list.
5632
5636
Expressions appearing in the \grammarterm {compound-statement} of a \grammarterm {lambda-expression}
5633
5637
are not subexpressions of the \grammarterm {lambda-expression}.
5634
5638
\end {note }
5639
+ The \defnadjx {potentially-evaluated}{subexpressions}{subexpression} of
5640
+ an expression, conversion, or \grammarterm {initializer} $ E$ are
5641
+ \begin {itemize }
5642
+ \item
5643
+ the constituent expressions of $ E$ and
5644
+ \item
5645
+ the subexpressions thereof that
5646
+ are not subexpressions of a nested unevaluated operand\iref {term.unevaluated.operand }.
5647
+ \end {itemize }
5635
5648
5636
5649
\pnum
5637
5650
A \defn {full-expression} is
Original file line number Diff line number Diff line change 659
659
shall not directly or indirectly cause the implicit definition of a
660
660
defaulted default constructor for the enclosing class or the
661
661
exception specification of that constructor.
662
+ An immediate invocation\iref {expr.const } that
663
+ is a potentially-evaluated subexpression\iref {intro.execution }
664
+ of a default member initializer
665
+ is neither evaluated nor checked for whether it
666
+ is a constant expression at the point where the subexpression appears.
662
667
663
668
\pnum
664
669
A member shall not be declared with the \keyword {extern}
Original file line number Diff line number Diff line change 4004
4004
copy-initialization semantics\iref {dcl.init }.
4005
4005
The names in the
4006
4006
default argument are looked up, and the semantic constraints are checked,
4007
- at the point where the default argument appears.
4007
+ at the point where the default argument appears, except that
4008
+ an immediate invocation\iref {expr.const } that
4009
+ is a potentially-evaluated subexpression\iref {intro.execution } of
4010
+ the \grammarterm {initializer-clause} in a \grammarterm {parameter-declaration} is
4011
+ neither evaluated
4012
+ nor checked for whether it is a constant expression at that point.
4008
4013
Name lookup and checking of semantic constraints for default
4009
4014
arguments of templated functions are performed as described in~\ref {temp.inst }.
4010
4015
\begin {example }
4684
4689
\end {note }
4685
4690
\end {itemize }
4686
4691
4692
+ \pnum
4693
+ An immediate invocation\iref {expr.const } that is not evaluated where
4694
+ it appears\iref {dcl.fct.default,class.mem.general }
4695
+ is evaluated and checked for whether it is
4696
+ a constant expression at the point where
4697
+ the enclosing \grammarterm {initializer} is used in
4698
+ a function call, a constructor definition, or an aggregate initialization.
4699
+
4687
4700
\pnum
4688
4701
An \grammarterm {initializer-clause} followed by an ellipsis is a
4689
4702
pack expansion\iref {temp.variadic }.
Original file line number Diff line number Diff line change 7923
7923
or
7924
7924
7925
7925
\item
7926
- a subexpression of one of the above
7927
- that is not a subexpression of a nested unevaluated operand\iref {term.unevaluated.operand }.
7926
+ a potentially-evaluated subexpression\iref {intro.execution } of one of the above.
7928
7927
\end {itemize }
7929
7928
7930
7929
\indextext {function!needed for constant evaluation}%
Original file line number Diff line number Diff line change 5978
5978
It is unspecified whether or not an implementation implicitly instantiates a
5979
5979
virtual member function of a class template if the virtual member function would
5980
5980
not otherwise be instantiated.
5981
- The use of a template specialization in a default argument
5982
- shall not cause the template to be implicitly instantiated except that a
5983
- class template may be instantiated where its complete type is needed to determine
5984
- the correctness of the default argument.
5981
+ The use of a template specialization in
5982
+ a default argument or default member initializer
5983
+ shall not cause the template to be implicitly instantiated except
5984
+ where needed to determine
5985
+ the correctness of the default argument or default member initializer.
5985
5986
The use of a default argument in a
5986
5987
function call causes specializations in the default argument to be implicitly
5987
5988
instantiated.
5989
+ Similarly, the use of a default member initializer
5990
+ in a constructor definition or an aggregate initialization
5991
+ causes specializations in the default member initializer to be instantiated.
5988
5992
5989
5993
\pnum
5990
5994
If a function template
You can’t perform that action at this time.
0 commit comments