libstdc++-v3/testsuite/std/format/functions/107871.cc
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | |
| 3 | #include <format> |
| 4 | |
| 5 | struct O { |
| 6 | using difference_type = std::ranges::__detail::__max_diff_type; |
| 7 | O& operator=(const char&); |
| 8 | O& operator*(); |
| 9 | O& operator++(); |
| 10 | O& operator++(int); |
| 11 | }; |
| 12 | |
| 13 | auto str = std::format_to_n(O{}, 4, "{}", " "); // PR libstdc++/107871 |