From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A22C385771E; Thu, 27 Apr 2023 23:04:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A22C385771E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682636651; bh=tdCgohHjz4jXjW6iEwnByKi+aHqTVViWjHlwxNfm9eQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sOgfHK/Dgl8Sw/opfDtdw/bfDuqRsg0XNeWeeqz5kDVdgRSEzqq5+5tLNqgJoXVNp 23YgsYb7znE+Fal/l71jQOkcRgPaAqJkeqRBgcHR0kQYDYCZO6ZaMUwW4uZL5tMI9Q x1TVjgJAGhjBlitgN7sqW04A8QOQ1tP2LJVHgSYo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96830] GCC does not complain about redeclaration with inconsistent requires clause Date: Thu, 27 Apr 2023 23:04:09 +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: 10.2.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D96830 --- Comment #15 from CVS Commits --- The releases/gcc-10 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:3cf551240fcbc7a5e0f5ba07a9164e237e6c097b commit r10-11316-g3cf551240fcbc7a5e0f5ba07a9164e237e6c097b Author: Jonathan Wakely Date: Wed Jul 20 12:49:28 2022 +0100 libstdc++: Fix minor bugs in std::common_iterator The noexcept-specifier for some std::common_iterator constructors was incorrectly using an rvalue as the first argument of std::is_nothrow_assignable_v. This gave the wrong answer for some types, e.g. std::common_iterator, because an rvalue of scalar type cannot be assigned to. Also fix the friend declaration to use the same constraints as on the definition of the class template. G++ fails to diagnose this error, due to PR c++/96830. Finally, the copy constructor was using std::move for its argument in some cases, which should be removed. libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (common_iterator): Fix incorrect uses of is_nothrow_assignable_v. Fix inconsistent constraints on friend declaration. Do not move argument in copy constructor. * testsuite/24_iterators/common_iterator/1.cc: Check for noexcept constructibnle/assignable. (cherry picked from commit 3b5567c3ec7e5759bdecc6a6fc0be2b65a93636e)=