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

Reply via email to