From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 24F3F386185A; Fri, 18 Jun 2021 07:56:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24F3F386185A From: "ostash at ostash dot kiev.ua" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100667] [11/12 Regression] std::tuple cannot be constructed from A&&, if A not defined (only forward declared) Date: Fri, 18 Jun 2021 07:56:06 +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: 11.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ostash at ostash dot kiev.ua X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Fri, 18 Jun 2021 07:56:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100667 Viktor Ostashevskyi changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ostash at ostash dot kiev.= ua --- Comment #1 from Viktor Ostashevskyi --- Hello, I have another example, but probably related: #include #include class Foo{}; std::tuple bar() { return { {}, Foo{}}; } Fails starting from GCC 11.1 in C++11/14/17/20 modes with the following err= or: : In function 'std::tuple, std::allocator >, Foo> bar()': :8:23: error: conversion from '' to 'std::tuple, std::allocator >, Foo>' is ambiguous 8 | return { {}, Foo{}}; | ^ In file included from :1: /opt/compiler-explorer/gcc-11.1.0/include/c++/11.1.0/tuple:1144:9: note: candidate: 'std::tuple<_T1, _T2>::tuple(std::allocator_arg_t, const _Alloc&) [with _Alloc =3D Foo; typename std::enable_if::value, _T1, _T2>::__is_implicitly_default_constructible(), bool>::type =3D = true; _T1 =3D std::__cxx11::basic_string; _T2 =3D Foo]' 1144 | tuple(allocator_arg_t __tag, const _Alloc& __a) | ^~~~~ /opt/compiler-explorer/gcc-11.1.0/include/c++/11.1.0/tuple:1052:9: note: candidate: 'constexpr std::tuple<_T1, _T2>::tuple(const _T1&, const _T2&) [= with bool _Dummy =3D true; typename std::enable_if::__is_implicitly_constructible(), bool>::type =3D true; _T1 =3D std::__cxx11::basic_string; _T2 =3D Foo= ]' 1052 | tuple(const _T1& __a1, const _T2& __a2) |=