public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/113522] New: std::swap cannot be called with explicit template argument std::array<int,3>
@ 2024-01-20  9:22 fchelnokov at gmail dot com
  2024-01-20  9:27 ` [Bug libstdc++/113522] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: fchelnokov at gmail dot com @ 2024-01-20  9:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113522

            Bug ID: 113522
           Summary: std::swap cannot be called with explicit template
                    argument std::array<int,3>
           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 <array>
#include <utility>

int main() {
    std::array<int,3> a, b;
    std::swap< std::array<int,3> >( a, b ); 
}

is accepted by MSVC and Clang with libc++, but GCC with libstdc++ complains:

error: no matching function for call to 'swap<std::array<int, 3>
>(std::array<int, 3>&, std::array<int, 3>&)'

Online demo: https://godbolt.org/z/8xnd5PsfE

Related discussion: https://stackoverflow.com/q/77844837/7325599

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-30 12:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20  9:22 [Bug libstdc++/113522] New: std::swap cannot be called with explicit template argument std::array<int,3> fchelnokov at gmail dot com
2024-01-20  9:27 ` [Bug libstdc++/113522] " redi at gcc dot gnu.org
2024-01-20  9:34 ` pinskia at gcc dot gnu.org
2024-01-20  9:35 ` pinskia at gcc dot gnu.org
2024-01-25  8:37 ` de34 at live dot cn
2024-01-25  9:38 ` redi at gcc dot gnu.org
2024-01-25  9:44 ` redi at gcc dot gnu.org
2024-01-25  9:48 ` pinskia at gcc dot gnu.org
2024-01-30 12:01 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).