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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Since as you mention a member function body is a complete-class context,
libstdc++'s std::pair implementation strategy does seem non-conforming in this
case.

Clang seems to not propagate constructor constraints to the implicit deduction
guide, according to the following example, and is probably the reason why it
accepts your reduced example.

template<class T>
struct A {
  A(T) requires false; // #1
  A(...); // #2
};

auto a = A(0); // GCC rejects, Clang incorrectly(?) selects #2 with T=int.

Reply via email to