From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A5A2A3858D3C; Sat, 20 Jan 2024 09:22:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5A2A3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705742573; bh=vVhrTxzObcwjicm4bCKv/Jla2moeakNYrBfZSm/qFnk=; h=From:To:Subject:Date:From; b=qm9D82HyOleIW9gYt1H3EGvqAl8+Ox6MKG/UCw9xhm/svJaq/7z6ZnK/NOiqMCdLb klyhOPlrSpZyU3FufyObz3lKB11woJ83Yb396JNuvxsZyTwn4Udr8jT6dTiSDEnRhV N+6zqM3GyiaZMgBiYxDuy43QlS5R1ikPkmuI7JBM= From: "fchelnokov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113522] New: std::swap cannot be called with explicit template argument std::array Date: Sat, 20 Jan 2024 09:22:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fchelnokov 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D113522 Bug ID: 113522 Summary: std::swap cannot be called with explicit template argument std::array Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This program #include #include int main() { std::array a, b; std::swap< std::array >( a, b );=20 } is accepted by MSVC and Clang with libc++, but GCC with libstdc++ complains: error: no matching function for call to 'swap >(std::array&, std::array&)' Online demo: https://godbolt.org/z/8xnd5PsfE Related discussion: https://stackoverflow.com/q/77844837/7325599=