public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108759] New: "mandatory copy elision" not implemented during constant evaluation redux
@ 2023-02-11  5:49 herring at lanl dot gov
  2023-02-13 17:20 ` [Bug c++/108759] " mpolacek at gcc dot gnu.org
  2023-04-27 17:39 ` arthur.j.odwyer at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: herring at lanl dot gov @ 2023-02-11  5:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108759
           Summary: "mandatory copy elision" not implemented during
                    constant evaluation redux
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: herring at lanl dot gov
  Target Milestone: ---

Extending the test case in (the invalid) #94537 to have a user-provided
destructor does not cause the "mandatory copy elision" to take place even
though the implementation is no longer permitted to introduce a temporary:

  struct A;
  extern const A a;
  struct A {
    bool special=this==&a;
    constexpr ~A() {}
  };
  constexpr A get() {return {};}  // or "return A();"
  constexpr A a=get();
  static_assert(a.special);

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

end of thread, other threads:[~2023-04-27 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-11  5:49 [Bug c++/108759] New: "mandatory copy elision" not implemented during constant evaluation redux herring at lanl dot gov
2023-02-13 17:20 ` [Bug c++/108759] " mpolacek at gcc dot gnu.org
2023-04-27 17:39 ` arthur.j.odwyer 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).