
23 Mar
2005
23 Mar
'05
3:49 p.m.
On Wed, 23 Mar 2005 09:01:51 -0600 "Michael Goldshteyn" <mgoldshteyn@earthlink.net> wrote:
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.
The original example looks fine to me. Why do you think it is incorrect?