From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B6326383568B; Fri, 22 Jul 2022 07:07:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6326383568B 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: Fri, 22 Jul 2022 07:07:57 +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: 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 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: Fri, 22 Jul 2022 07:07:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96830 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:c7a7985e5e24d6d13d179006bc748f5a1eaeebfd commit r11-10165-gc7a7985e5e24d6d13d179006bc748f5a1eaeebfd 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)=