Base is std::basic_*stream, Other is std::basic_streambuf. The code generates a runtime error, as I was afraid it would, because the base has to be initialized before any members of the derived class.
This works, but would there still be any issue with this? Is there a better way? I cannot define My inline in the header. Should I just abandon the uniue_ptr altogether?
Well if you don't want to reveal the pointer you'd need 2 constructors for each. One private with the pointer and another public without it. I guess it isn't that big of a deal since the public ones are basically one liners.