From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA9023858C5E; Mon, 11 Sep 2023 08:54:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA9023858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694422482; bh=NwN/6j0F7drdP9DR/5Ob/GK1QUaowY7yA3VO/bDlEm8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ty8K+qRyATGhk9871o6JdyCIa93yZl48qmdkSvWw/fKKeKwYBikdMsvpu35nrmzFW 8v4ePbluJJ1Uw80aIYlchGUcY5CDaONbe7Ptd20UM2sk/yGwP6hI6gGE/2c3xBdPNE 2uVU52v7kzGOrOptofEy8rYaaS6KEbsGb10oOQ0c= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111357] [11/12/13/14 Regression] __integer_pack fails to work with values of dependent type convertible to integers in noexcept context Date: Mon, 11 Sep 2023 08:54:41 +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: 13.2.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111357 --- Comment #4 from Jonathan Wakely --- Reduced to remove : namespace std { template struct integer_sequence { }; template using make_integer_sequence =3D integer_sequence<_Tp, __integer_pack(_Num)...>; } using std::integer_sequence; using std::make_integer_sequence; template void g(integer_sequence) {} template struct c1 { static constexpr int value =3D 1; constexpr operator int() { return value; }=20 }; template struct R { using S =3D make_integer_sequence{}>; R() noexcept(noexcept(g(S()))) {} }; int main() { R(); } This certainly seems like a front end bug not a libstdc++ one, but the libr= ary can make it work by casting _Tp _Num to its own type: template using make_integer_sequence =3D integer_sequence<_Tp, __integer_pack(_Tp(_Num))...>; This should not be needed, but makes it work.=