This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80488] New: Erroneous error "lambda-expression in template argument"
- From: "eric.niebler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Apr 2017 01:10:56 +0000
- Subject: [Bug c++/80488] New: Erroneous error "lambda-expression in template argument"
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80488
Bug ID: 80488
Summary: Erroneous error "lambda-expression in template
argument"
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Compile with -std=gnu++1z:
template <auto> using x = void;
using Y = x<+[]{}>;
The above code creates a lambda and then applies unary operator +, forcing it
to decay to a function pointer. Since that's constexpr, it should be a valid
template argument.
clang-trunk accepts this code.