public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/102354] New: std::advance overloaded for path::iterator will never be called
@ 2021-09-15 17:57 hewillk at gmail dot com
  2021-09-15 19:49 ` [Bug libstdc++/102354] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2021-09-15 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102354
           Summary: std::advance overloaded for path::iterator will never
                    be called
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

r267057 seems to be implemented incorrectly:

  template<typename _InputIterator, typename _Distance>
    void
    advance(filesystem::path::iterator& __i, _Distance __n)
    { __path_iter_advance(__i, static_cast<ptrdiff_t>(__n)); }


The only way to call this std::advance is to explicitly specify _InputIterator,
for example:

  std::filesystem::path p = "/a/b/c/d/e/f/g";
  auto it = p.begin();
  std::advance<void>(it, 1);

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

end of thread, other threads:[~2022-05-09 16:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 17:57 [Bug libstdc++/102354] New: std::advance overloaded for path::iterator will never be called hewillk at gmail dot com
2021-09-15 19:49 ` [Bug libstdc++/102354] " redi at gcc dot gnu.org
2021-09-16 22:18 ` redi at gcc dot gnu.org
2022-05-09 16:48 ` 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).