public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105693] New: Requires-clause constructor is not selected
@ 2022-05-22 18:40 fchelnokov at gmail dot com
  2022-10-26 20:37 ` [Bug c++/105693] " pinskia at gcc dot gnu.org
  2022-10-26 20:42 ` [Bug c++/105693] Requires-clause constructor that is deleted is not overriding the "= default" one pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: fchelnokov at gmail dot com @ 2022-05-22 18:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105693
           Summary: Requires-clause constructor is not selected
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

In the following program struct template A has deleted default constructor for
T=int:

#include <concepts>

template<typename T>
struct A {
    A() = default;
    A() requires (std::same_as<T,int>) = delete;
};

A<int> a;

The program is rejected by Clang and MSVC, but not by GCC. Demo:
https://gcc.godbolt.org/z/G7T5xv35q

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

end of thread, other threads:[~2022-10-26 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 18:40 [Bug c++/105693] New: Requires-clause constructor is not selected fchelnokov at gmail dot com
2022-10-26 20:37 ` [Bug c++/105693] " pinskia at gcc dot gnu.org
2022-10-26 20:42 ` [Bug c++/105693] Requires-clause constructor that is deleted is not overriding the "= default" one 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).