File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1617
1617
};
1618
1618
struct derived : base {};
1619
1619
1620
- derived d1{}; // Error. The code was well-formed before.
1620
+ derived d1{}; // error; the code was well-formed in \CppXIV
1621
1621
derived d2; // still OK
1622
1622
\end {codeblock }
1623
1623
Original file line number Diff line number Diff line change 1444
1444
-> decltype((h<T>())); // does not force completion of \tcode {A<T>}; \tcode {A<T>::\~ {}A()} is not implicitly
1445
1445
// used within the context of this \grammarterm {decltype-specifier}
1446
1446
void r() {
1447
- q(42); // Error : deduction against \tcode {q} succeeds, so overload resolution selects
1448
- // the specialization `` \tcode {q(T) -> decltype((h<T>())) [with T=int]}'' .
1449
- // The return type is \tcode {A<int>}, so a temporary is introduced and its
1450
- // destructor is used, so the program is ill-formed.
1447
+ q(42); // error : deduction against \tcode {q} succeeds, so overload resolution selects
1448
+ // the specialization `` \tcode {q(T) -> decltype((h<T>())) [with T=int]}'' ;
1449
+ // the return type is \tcode {A<int>}, so a temporary is introduced and its
1450
+ // destructor is used, so the program is ill-formed
1451
1451
}
1452
1452
\end {codeblock }
1453
1453
\end {example }
Original file line number Diff line number Diff line change 294
294
void prog () {
295
295
f (1, 2); // OK: call \tcode {f(int, int)}
296
296
f (1); // OK: call \tcode {f(int, int)}
297
- f (); // Error : \tcode {f(int, int)} or \tcode {f()}?
297
+ f (); // error : \tcode {f(int, int)} or \tcode {f()}?
298
298
}
299
299
\end {codeblock }
300
300
\end {example }
1840
1840
1841
1841
void use() {
1842
1842
f(3); // OK, default argument was not used for viability
1843
- f(); // Error : found default argument twice
1843
+ f(); // error : found default argument twice
1844
1844
}
1845
1845
\end {codeblock }
1846
1846
\end {example }
You can’t perform that action at this time.
0 commit comments