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

            Bug ID: 107871
           Summary: _Iter_sink:: _M_overflow missing some difference type
                    casting
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

#include <format>

struct O {
  using difference_type = std::ranges::__detail::__max_diff_type;
  O& operator=(const char&);
  O& operator*();
  O& operator++();
  O& operator++(int);
};

int main() {
  std::format_to_n(O{}, 4, "{}", " ");
}

https://godbolt.org/z/x78qjfse6

Reply via email to