
10 Oct
2005
10 Oct
'05
2:10 p.m.
I took a look at the examples in the Boost::Any documentation and found this: bool is_int(const boost::any & operand) { return operand.type() == typeid(int); } bool is_char_ptr(const boost::any & operand) { try { any_cast<const char *>(operand); return true; } catch(const boost::bad_any_cast &) { return false; } } bool is_string(const boost::any & operand) { return any_cast<std::string>(&operand); } Is that what you're looking for? Christian