public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98642] New: wrong "use of deleted function" error
@ 2021-01-12 19:51 mpolacek at gcc dot gnu.org
  2021-01-12 19:52 ` [Bug c++/98642] [10/11 Regression] " mpolacek at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-12 19:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98642
           Summary: wrong "use of deleted function" error
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

class base {
public:
  base(void) {};
  base(base &&) = delete;
};

class foo : public base {
};

template<typename C>
inline C &bar(void)
{
  static C c{};
  return c;
}

const foo &baz(void)
{
  return bar<const foo>();
}

is rejected since r11-2704 in C++17.  clang++/EDG accept this.

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

end of thread, other threads:[~2021-03-29 11:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 19:51 [Bug c++/98642] New: wrong "use of deleted function" error mpolacek at gcc dot gnu.org
2021-01-12 19:52 ` [Bug c++/98642] [10/11 Regression] " mpolacek at gcc dot gnu.org
2021-01-12 19:56 ` mpolacek at gcc dot gnu.org
2021-01-12 20:55 ` jason at gcc dot gnu.org
2021-01-15 18:57 ` cvs-commit at gcc dot gnu.org
2021-01-15 19:12 ` jason at gcc dot gnu.org
2021-01-27  9:34 ` [Bug c++/98642] [10 " rguenth at gcc dot gnu.org
2021-01-27  9:36 ` rguenth at gcc dot gnu.org
2021-01-29 16:00 ` cvs-commit at gcc dot gnu.org
2021-03-19 13:21 ` jakub at gcc dot gnu.org
2021-03-29 11:19 ` rguenth 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).