As it turned out, I still had to derive from both streambuf and iostream, because readsome() is the only non-blocking call supported by the iostream interface, and it's seriously inadequate. There really needs to be something like readsome() but doesn't extract data. streambuf even provides in_avail(). Not sure why iostream doesn't expose that.
The class ended up being something like this:
Code:
class MySerial : public std::iostream, public std::streambuf {
public:
MySerial() : std::iostream(this) {}
protected:
// overriding functions for streambuf
}
It seems to be working perfectly fine, and I can provide my own non-blocking interface alongside.