From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE6533944420; Wed, 11 Mar 2020 18:41:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE6533944420 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1583952101; bh=KOlUbNSCdDits68Q29huyKpQzEx64TXdzG+O40lYKGs=; h=From:To:Subject:Date:From; b=xNOeH2hx9fTMycZ30pmZrGJxyQF95VLMZpq3fiPrTL41g5eaWLAxppQId2OTj/4fw S8BOJDQin4TCckn7xcFBN4TB+4eodb5XExvtfrC33X28TFi7iP2hi9Ktcjnnda1eOE IOH5Pa05jITIQdewgr2LKXyznZ9kswclf1diz0w4= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94149] New: __is_constructible doesn't know about C++20 parenthesized init for arrays Date: Wed, 11 Mar 2020 18:41:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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, 11 Mar 2020 18:41:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94149 Bug ID: 94149 Summary: __is_constructible doesn't know about C++20 parenthesized init for arrays Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- In C++20 this is well-formed: using T =3D int[2]; T t(1, 2); which means that std::is_constructible_v should be true. The FE intrinsic gives the wrong answer, and the std::is_nothrow_constructi= ble library trait isn't going to work even if the intrinsic starts to give the right answer. i.e. this should compile with -std=3Dgnu++2a #include int main() { using T =3D int[2]; T t(1, 2); static_assert(__is_constructible(T, int, int)); static_assert(std::is_constructible_v); static_assert(std::is_nothrow_constructible_v); return t[0]; } a.cc: In function 'int main()': a.cc:8:17: error: static assertion failed 8 | static_assert(__is_constructible(T, int, int)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:9:22: error: static assertion failed 9 | static_assert(std::is_constructible_v); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:10:22: error: static assertion failed 10 | static_assert(std::is_nothrow_constructible_v); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=