From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A53738618C0; Tue, 14 Jul 2020 15:39:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A53738618C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594741164; bh=F/n2GKF1GadMlGnLZWYONvwnIm8YJXxUi3I1W+IgZFU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IaE6H9jEiK890HM+om49b0ndtm7yM8MZZYrihdPv3lPFwGKJZDFvZ+8bIiBtslZ1u Zx1iA/9Zor5rit2QgYTqUyq1DiNNtYEi47vK3jAJnfAtcVoGPeEeEVODb5cLG+dFYP ApTOMLTo7ZS8QV8UFgnjzwYoN1XJ+r5reWPrHks8= From: "wjwray at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96185] Enhancement: Please add a builtin to count bindings in [dcl.struct.bind] Date: Tue, 14 Jul 2020 15:39:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: wjwray at gmail dot com 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: 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: Tue, 14 Jul 2020 15:39:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96185 --- Comment #6 from Will Wray --- Thanks for the comment on approach Jonathan: I'd noticed some collaboration and agreement around previous builtins such as __builtin_bit_cast which is now available in both GCC & Clang (though with some small inevitable divergence of behaviour). Clearly Richard's suggestion to prioritize P1061, with such illustrious co-authorship, is the best solution. I can offer to help on the gcc side. This is the std way to go. This request was borne of some frustration; I miss this facility in C++20. By a hack, Clang happens to support SFINAE on structured binding since v5 - lack of any way to do it in GCC prompted this request. My thinking was that a builtin can see quicker implementation and adoption than std features. This builtin _is_ in support of a std proposal.=