As you know, it is impossible to have a standard collection of links. It is also not possible to copy a stream object.
But what if I want to make a collection (say, std::vector ) of stream objects or references to a stream object?
I know that I can wrap a link to a stream object, for example. structure, but then you either need to implement the full interface (if you want to use the wrapper directly as a stream, which I would prefer), or use the public getter function and use it everywhere to get the actual stream.
Is there an easier way? C ++ 11 solutions are fine.
source share