mode(模式?):
input: 使用一个character队列,用来输入
output: 使用一个character队列,用来输出
bidirectional: 使用两个character队列,分别用来输入、输出
input-seekable: 使用一个character队列用来输入,包含一个读索引游标
output-seekable: 使用一个character队列用来输出,包含一个写索引游标
seekable: 使用一个character队列用来输入输出,包含一个读/写复用的索引游标
dual-seekable: 使用一个character队列来输入输出,包含两个索引游标分别用来标识读写
bidirectional-seekable: 使用两个character队列分别用来输入输出,同时每个队列包含一个各自的索引游标
*blocking: 如果读请求永远比剩下的character少除了end情况,而且写请求需要的永远比现有的少。那就是一个blocking。
The Blocking concept does not apply to filters. Instead, filters are required to be blocking-preserving, which means that
a read request never produces fewer characters than requested unless end-of-stream has been reached or unless a read request to a downsteam Source produces fewer characters than requested, and
a write request never consumes fewer characters than requested unless a write request to a downsteam Sink consumes fewer characters than requested.
*如果熟悉stl应该就了解traits技术(应该是技巧)
<boost/iostreams/traits.hpp>
这里是boost::iostream库的traits
还有个模版元函数mod_of