How to declare an “implicit conversion” in a variadic template?
问题 My aim is to send a data to several streams. It is possible by using boost::tee. But I want to write a wrapper with variadic template for using several streams. The problem is that I need an implicit convertation from descendant struct to ancestor struct. Or something like that. #include <boost/iostreams/tee.hpp> #include <boost/iostreams/stream.hpp> #include <fstream> #include <iostream> using namespace std; namespace bio = boost::iostreams; using bio::tee_device; using bio::stream; template