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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:f77bbc8f86900b21abdec457b4153b30512e192d

commit r13-1805-gf77bbc8f86900b21abdec457b4153b30512e192d
Author: Patrick Palka <ppa...@redhat.com>
Date:   Fri Jul 22 18:42:02 2022 -0400

    c++: CTAD from initializer list [PR106366]

    During CTAD, we currently perform the first phase of overload resolution
    from [over.match.list] only if the class template has a list constructor.
    But according to [over.match.class.deduct]/4 it should be enough to just
    have a guide that looks like a list constructor (which is a more general
    criterion in light of user-defined guides).

            PR c++/106366

    gcc/cp/ChangeLog:

            * pt.cc (do_class_deduction): Don't consider TYPE_HAS_LIST_CTOR
            when setting try_list_ctor.  Reset args even when try_list_ctor
            is true and there are no list candidates.  Call resolve_args on
            the reset args.  Rename try_list_ctor to try_list_cand.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1z/class-deduction112.C: New test.

Reply via email to