stream<my_device> ss( dev, 1 );

see also
ttp://www.boost.org/libs/iostreams/doc/index.html