[Bug c++/88313] New: generic lambda in default template argument
blitzrakete at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 3 13:27:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88313
Bug ID: 88313
Summary: generic lambda in default template argument
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
gcc (with no flags) rejects the following code:
// 'auto' parameter not permitted in this context
template <int = [](auto) { return 0; }(1)>
void f();
This is bogus because anywhere where a non-generic lambda is allowed, a generic
one is allowed too. Replacing 'auto' with 'int' makes gcc accept the code.
More information about the Gcc-bugs
mailing list