Am struggling a lot to find how to do to use boost::any
to create a print function that can print any type using template first.
template
Check out this thread on the Boost mailing list: http://lists.boost.org/Archives/boost/2005/01/79232.php
It has a few ideas, some of which seem sort of OK and some of which don't (to me). Overall, though, this seems like a difficult task to accomplish in a general way, since (as mentioned in that thread), some types will never be ostream'able, yet could be contained in a boost::any
object.