Created on 2025-09-13.00:00:00 last changed 3 weeks ago
Suggested resolution:
Change in 13.10.3.1 [temp.deduct.general] paragraph 9 as follows:
[ Example: ...template <class T> auto h(T) -> decltype([x = T::invalid]() { }); void h(...); h(0); //-- end example ]error: invalid expression not part of the immediate contextOK, calls h(...) template <class T> auto i(T) -> decltype([]() -> typename T::invalid { }); void i(...); i(0); //error: invalid expression not part of the immediate contextOK, calls i(...) template <class T> auto j(T t) -> decltype([](auto x) -> decltype(x.invalid) { } (t));// #1void j(...);// #2j(0); //deduction fails on #1,OK, calls#2j(...)
(From submission #761.)
After issue 2672, the third and fourth comments in Example 7 in 13.10.3.1 [temp.deduct.general] paragraph 9 incorrectly treat the lambda-introducer and trailing return type of a lambda as if they were part of the lambda body.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-09-22 19:23:48 | admin | set | messages: + msg8113 |
2025-09-13 00:00:00 | admin | create |