From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1DF793858C54; Thu, 2 Mar 2023 02:38:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DF793858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677724727; bh=ntxfochQpm3RdIA3ND2XtEK6YJ5rcLntIejeJ9GE44M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GnVBQKlXtI0Li32+7M0vEQIU+/6t/bR5pJC5w8H1JvbdX/Tpk+DNGPA7MEMfShT05 kxI2lxyzIyxGfb77AqF4XRwDWbX3QgHUWCJ/hdyC5704xamrhq27SfysFUWlwMfRin 7DLsW/lltecX3Uy7VOaj20/II80MzfnAmbrKa6u8= From: "rodgertq at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108974] std::barrier except completion function which is not manifestly noexcept Date: Thu, 02 Mar 2023 02:38:46 +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.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rodgertq 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: --- 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=3D108974 --- Comment #4 from Thomas Rodgers --- (In reply to Jiang An from comment #3) > > is_nothrow_invocable_v shall be true. >=20 > If implementation divergence is not intendedly permitted, I don't think it > makes much sense to introduce UB in this way. >=20 > I guess we should either turn it into a mandating requirement: > > Instantiation of barrier is ill-formed > > if is_nothrow_invocable_v is not true. >=20 > Or relax the preconditions: > > If any invocation to the completion function throws an exception, > > the behavior is undefined. >=20 > I've mailed to LWG Chair for this... LWG Chair has already weighed in on this thread. libstdc++ and libc++ have essentially the same implementation of std::barri= er (libstdc++'s implementation is derived from libc++'s). So that they behave consistently and MSVC is different is not surprising. I don't have a strong opinion on whether this should be UB ore mandated. Raising an LWG issue seems reasonable.=