[Bug c++/105508] declaration of 'const bool b' shadows template parameter when defining concept using lambda

hewillk at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri May 6 15:26:55 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105508

--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
Reduced. In fact, I don't know if gcc is right here.

template<bool b>
struct S {
  int x = [b=1] { return b; }();
};

https://godbolt.org/z/fjqvePn5h


More information about the Gcc-bugs mailing list