
23 Mar
2005
23 Mar
'05
3:01 p.m.
There is a bug in the sample code which cause me a lot of grief in understanding how boost::any functions, this morning. At: http://www.boost.org/doc/html/any/s02.html The code: --- bool is_string(const boost::any & operand) { return any_cast<std::string>(&operand); } should read: bool is_string(const boost::any & operand) { return any_cast<std::string *>(&operand); } --- Notice the addition of the asterisk. Thanks, Michael Goldshteyn