This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/80488] Erroneous error "lambda-expression in template argument"


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]