We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24b090f commit 4005215Copy full SHA for 4005215
source/expressions.tex
@@ -7984,12 +7984,13 @@
7984
7985
template<class T>
7986
constexpr T h(T t = id(x)) { // \tcode{h<int>} is not an immediate function
7987
+ // \tcode{id(x)} is not evaluated when parsing the default argument\iref{dcl.fct.default,temp.inst}
7988
return t;
7989
}
7990
7991
-constexpr T hh() { // \tcode{hh<int>} is an immediate function
7992
- return h<T>();
+constexpr T hh() { // \tcode{hh<int>} is an immediate function because of the invocation
7993
+ return h<T>(); // of the immediate function \tcode{id} in the default argument of \tcode{h<int>}
7994
7995
7996
int i = hh<int>(); // error: \tcode{hh<int>()} is an immediate-escalating expression
0 commit comments