This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/88313] New: generic lambda in default template argument
- From: "blitzrakete at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 03 Dec 2018 13:27:40 +0000
- Subject: [Bug c++/88313] New: generic lambda in default template argument
- Auto-submitted: auto-generated
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.