In abstract terms a pipe is a stream/FIFO style container with a destructive read. It has a read() method that copies chunks of data all at once, and functions like get and put for single bytes. When the read or get returns though, the data that was copied out of the pipe is removed from the pipe's internal buffer - unlike a file or any other container type.
Most (all?) of the STL containers do not provide a similar read() in to a buffer command. Is there a fifo container type with a pop_many() member?
stringstream is about the closest thing I can think of since it maintains an internal read pointer and future reads will block until the stream fills up again. The container is empty from the API point of view, but the consumed data would have to be garbage collected manually.
Is there an equivalent container or stream class in C++ that does this, or is it a matter of roll-your-own (like in the stringstream example)?