Instead of writing every character directly into the container by using
a back_insert_iterator the data is buffered in an array. This buffer
is then inserted to the container by calling its insert member function.
Since there's no guarantee every container's insert behaves properly
containers need to opt-in to this behaviour. The appropriate standard
containers opt-in to this behaviour.
This change improves the performance of the format functions that use a
back_insert_iterator.
Depends on D110495
Is there any reason why this isn't implemented as a bool variable template that containers specialize or something similar? IMO it would be nice to keep containers free of a __enable_format_insertable typedef used for this sole purpose.
Requiring a specialization also makes it slightly less likely that users are going to do it for their own containers, which IMO is a good thing (we really don't want users to start depending on this unless the Standard commits to providing this functionality).
[Reading some other comments, I get the feeling this might have been how it was implemented in previous diffs, please let me know if that's the case]