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);

Reply via email to