[Bug libstdc++/87982] No error for std::generate_n(ptr, ptr, f)
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 29 08:51:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87982
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> I think converting it to the iterator's difference type is the right fix.
> Doing that would make the original example ill-formed, because the pointer
> isn't convertible to ptrdiff_t.
Except that output iterators are allowed to defined difference_type as void.
More information about the Gcc-bugs
mailing list