public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/109203] New: sort(zip(v1, v2)) fails to compile
@ 2023-03-19 21:31 dvirtz at gmail dot com
  2023-03-19 21:32 ` [Bug libstdc++/109203] " dvirtz at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dvirtz at gmail dot com @ 2023-03-19 21:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109203
           Summary: sort(zip(v1, v2)) fails to compile
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dvirtz at gmail dot com
  Target Milestone: ---

```
    std::vector<int> vi;
    std::vector<std::string> vs;
    ranges::sort(views::zip(vi, vs));
```

results in

```
/opt/compiler-explorer/gcc-trunk-20230319/include/c++/13.0.1/bits/ranges_algo.h:54:31:
error: no matching function for call to '__invoke(std::ranges::less&,
std::pair<int, std::__cxx11::basic_string<char> >&, std::pair<int&,
std::__cxx11::basic_string<char>&>)'
   54 |           return std::__invoke(__comp,
      |                  ~~~~~~~~~~~~~^~~~~~~~
   55 |                                std::__invoke(__proj,
std::forward<_TL>(__lhs)),
      |                               
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   56 |                                std::__invoke(__proj,
std::forward<_TR>(__rhs)));
      |                               
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

https://godbolt.org/z/j5aj34dxb

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

end of thread, other threads:[~2024-02-01 20:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 21:31 [Bug libstdc++/109203] New: sort(zip(v1, v2)) fails to compile dvirtz at gmail dot com
2023-03-19 21:32 ` [Bug libstdc++/109203] " dvirtz at gmail dot com
2023-03-19 21:36 ` pinskia at gcc dot gnu.org
2023-03-19 21:39 ` pinskia at gcc dot gnu.org
2023-03-20  9:55 ` redi at gcc dot gnu.org
2023-03-20 16:16 ` ppalka at gcc dot gnu.org
2023-03-21  0:07 ` de34 at live dot cn
2024-01-15 19:22 ` ppalka at gcc dot gnu.org
2024-01-16 12:36 ` redi at gcc dot gnu.org
2024-02-01 20:04 ` cvs-commit 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).