https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102181
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:d9dfd7ad3e0196f60a3fc6df6d65a40fb905409f commit r12-4355-gd9dfd7ad3e0196f60a3fc6df6d65a40fb905409f Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Sep 29 21:19:36 2021 +0100 libstdc++: Improve diagnostics for misuses of output iterators This adds deleted overloads so that the errors for invalid uses of std::advance and std::distance are easier to understand (see for example PR 102181). libstdc++-v3/ChangeLog: * include/bits/stl_iterator_base_funcs.h (__advance): Add deleted overload to improve diagnostics. (__distance): Likewise.