Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add specialised AnnotatedString pipe read/writes
Ensure that when an AnnotatedIOBuffer is wrapped in an IOContext (or similar AnnotatedPipe-based construct), that writes of annotated strings/chars and reading out an AnnotatedString is unimpeded by the IOContext wrapping. Without these specialisations, the generic pipe_reader/pipe_writer fallbacks will directly access the underlying IOBuffer and annotations will be lost. There are a number of scenarios in which one might want to combine an AnnotatedIOBuffer and IOContext (for example setting the compact property). Losing annotations in such scenarios is highly undesirable. The read specialisation isn't actually needed to avoid this headache, but seems nice to have for completeness.
- Loading branch information