This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80488] Erroneous error "lambda-expression in template argument"
- From: "arbmind at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Jan 2018 11:28:45 +0000
- Subject: [Bug c++/80488] Erroneous error "lambda-expression in template argument"
- Auto-submitted: auto-generated
- References: <bug-80488-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80488
Andreas Reischuck <arbmind at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arbmind at gmail dot com
--- Comment #1 from Andreas Reischuck <arbmind at gmail dot com> ---
This bug also hit me.
I found this discussion on Stackoverflow:
https://stackoverflow.com/questions/43213997/why-is-gcc-failing-when-using-lambda-for-non-type-template-parameter
And I can report that VS2017 15.5 and clang 6 can compile this code:
template<void (*p)()>
void x() {}
void test() {
x<[] {}>();
}
template<auto> is not yet supported.