public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99524] New: initializer_list storage considered a temporary when accessed through NTTP
@ 2021-03-10 18:08 johelegp at gmail dot com
  2023-11-16  0:49 ` [Bug c++/99524] " arthur.j.odwyer at gmail dot com
  2023-11-16  0:51 ` johelegp at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: johelegp at gmail dot com @ 2021-03-10 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99524
           Summary: initializer_list storage considered a temporary when
                    accessed through NTTP
           Product: gcc
           Version: 11.0
               URL: https://godbolt.org/z/aWGr3P
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
                CC: johelegp at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/aWGr3P.
```C++
#include<initializer_list>
constexpr std::initializer_list<bool>il{true};
template<const bool*B>constexpr bool front=B[0];
static_assert(front<il.begin()>);
```
https://timsong-cpp.github.io/cppwp/n4861/dcl.init.list#5 explains its storage.
https://timsong-cpp.github.io/cppwp/n4861/dcl.init.list#6 explains its
lifetime.

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

end of thread, other threads:[~2023-11-16  0:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 18:08 [Bug c++/99524] New: initializer_list storage considered a temporary when accessed through NTTP johelegp at gmail dot com
2023-11-16  0:49 ` [Bug c++/99524] " arthur.j.odwyer at gmail dot com
2023-11-16  0:51 ` johelegp 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).