public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105508] New: declaration of 'const bool b' shadows template parameter when defining concept using lambda
@ 2022-05-06 15:23 hewillk at gmail dot com
2022-05-06 15:26 ` [Bug c++/105508] " hewillk at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: hewillk at gmail dot com @ 2022-05-06 15:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105508
Bug ID: 105508
Summary: declaration of 'const bool b' shadows template
parameter when defining concept using lambda
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
template<bool b>
concept C = [b=true] {
return b;
}();
static_assert(C<false>);
https://godbolt.org/z/8rKGToqhq
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/105508] declaration of 'const bool b' shadows template parameter when defining concept using lambda
2022-05-06 15:23 [Bug c++/105508] New: declaration of 'const bool b' shadows template parameter when defining concept using lambda hewillk at gmail dot com
@ 2022-05-06 15:26 ` hewillk at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: hewillk at gmail dot com @ 2022-05-06 15:26 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-06 15:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 15:23 [Bug c++/105508] New: declaration of 'const bool b' shadows template parameter when defining concept using lambda hewillk at gmail dot com
2022-05-06 15:26 ` [Bug c++/105508] " hewillk at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).