From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8D1D0382C407; Wed, 26 Jan 2022 19:03:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D1D0382C407 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/104242] [12 Regression] Class with constructor from std::any is not copyable Date: Wed, 26 Jan 2022 19:03:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2022 19:03:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104242 --- Comment #2 from Andrew Pinski --- Note Clang's error message might be more helpfull: In file included from :2: In file included from /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/any:39: /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/type_traits:168:14: error: base class has incomplete type : public __conditional_t<_B1::value, _B2, _B1> ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/type_traits:2244:36: note: in instantiation of template class 'std::__and_>, std::is_copy_constructible>' requested here using _Require =3D __enable_if_t<__and_<_Cond...>::value>; ^ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/any:188:19: note: in instantiation of template type alias '_Require' requested here typename =3D _Require<__not_<__is_in_place_type<_VTp>>, ^ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/any:190:7: note: in instantiation of default argument for 'any>' required here any(_Tp&& __value) ^~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/type_traits:971:54: note: while substituting deduced template arguments into function template 'any' [with _Tp =3D const A &, _VTp =3D (no value), _Mgr =3D (no value), $3= =3D (no value)] : public __bool_constant<__is_constructible(_Tp, _Args...)> ^ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/type_traits:1003:14: note: in instantiation of template class 'std::__is_constructible_impl' requested here : public __is_constructible_impl<_Tp, const _Tp&> ^ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/type_traits:1010:14: note: in instantiation of template class 'std::__is_copy_constructible_impl= ' requested here : public __is_copy_constructible_impl<_Tp> ^ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/type_traits:3205:5: note: in instantiation of template class 'std::is_copy_constructible' requested here is_copy_constructible<_Tp>::value; ^ :9:20: note: in instantiation of variable template specialization 'std::is_copy_constructible_v' requested here static_assert(std::is_copy_constructible_v); ^ /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.1/../../.= ./../include/c++/12.0.1/type_traits:1009:12: note: definition of 'std::is_copy_constructible' is not complete until t= he closing '}' struct is_copy_constructible ^=