public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101911] New: Type cannot be defined inside of the lambda in unevaluated context
@ 2021-08-14 17:33 eligorkadaf at gmail dot com
  2021-08-14 20:17 ` [Bug c++/101911] " pinskia at gcc dot gnu.org
  2021-10-12 23:40 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: eligorkadaf at gmail dot com @ 2021-08-14 17:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101911
           Summary: Type cannot be defined inside of the lambda in
                    unevaluated context
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eligorkadaf at gmail dot com
  Target Milestone: ---

The following code is rejected by gcc:

#include <vector>

int main() {
   std::vector<decltype([] { 
  struct { int x; } x;
  return x; }()) > vec;
}
gcc claims that types cannot be defined inside of decltype. Hovewer, I did not
find anything in standard to confirm such a message in this context. So if you
need any proof, proof me please that there is a reason for gcc to claim that
first.

https://godbolt.org/z/8n6djencY

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/101911] Type cannot be defined inside of the lambda in unevaluated context
  2021-08-14 17:33 [Bug c++/101911] New: Type cannot be defined inside of the lambda in unevaluated context eligorkadaf at gmail dot com
@ 2021-08-14 20:17 ` pinskia at gcc dot gnu.org
  2021-10-12 23:40 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-14 20:17 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-08-14
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/101911] Type cannot be defined inside of the lambda in unevaluated context
  2021-08-14 17:33 [Bug c++/101911] New: Type cannot be defined inside of the lambda in unevaluated context eligorkadaf at gmail dot com
  2021-08-14 20:17 ` [Bug c++/101911] " pinskia at gcc dot gnu.org
@ 2021-10-12 23:40 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-12 23:40 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fchelnokov at gmail dot com

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 102367 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-12 23:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 17:33 [Bug c++/101911] New: Type cannot be defined inside of the lambda in unevaluated context eligorkadaf at gmail dot com
2021-08-14 20:17 ` [Bug c++/101911] " pinskia at gcc dot gnu.org
2021-10-12 23:40 ` pinskia at gcc dot gnu.org

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).