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

--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:346ab5a54a831ad9c78afcbd8dfe98e0e07e3070

commit r12-7804-g346ab5a54a831ad9c78afcbd8dfe98e0e07e3070
Author: Jason Merrill <ja...@redhat.com>
Date:   Tue Mar 22 01:10:44 2022 -0400

    c++: delayed parse DMI [PR96645]

    With the changes for PR81359 and PR88368 to make get_nsdmi errors be
treated
    as substitution failure, we have the problem that if we check
    std::is_default_constructible for a complete class that still has unparsed
    default member initializers, we get an answer (false) that will be wrong
    once the DMIs have been parsed.  The traits avoid this problem for regular
    incomplete classes by giving an error if the operand is incomplete; we
    should do the same if get_nsdmi is going to fail due to unparsed DMI.

            PR c++/96645

    gcc/cp/ChangeLog:

            * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare.
            * class.cc (type_has_default_ctor_to_be_synthesized): New.
            (type_has_non_user_provided_default_constructor_1): Support it.
            (type_has_non_user_provided_default_constructor): Now a wrapper.
            * method.cc (complain_about_unparsed_dmi): New.
            (constructible_expr): Call it.

    gcc/testsuite/ChangeLog:

            * g++.dg/ext/is_constructible3.C: Expect error.
            * g++.dg/ext/is_constructible7.C: New test.

Reply via email to