Boost logo

Boost Users :

From: Johan Ericsson (johanericsson_at_[hidden])
Date: 2001-12-10 12:13:30


> > But that of course means changing the any.hpp file
> which of course
> > isn't something everyone is willing to do...
>
> Why not including a simple overloading of the <<
> operator?

There is a trade-off. Making the changes to the
"any.hpp" header will allow you to stream your
classes. But it also constrains the types that can be
placed within the "any" class. After the changes, you
can only place those types that have operator<<
defined into the "any" class.

That is why you should perhaps rename your modified
"any" class to avoid confusion with the original
class.

Johan

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net