|
Boost Users : |
Subject: [Boost-users] boost::any, string conversion and serialization
From: Archie14 (admin_at_[hidden])
Date: 2010-05-19 11:49:34
How to get a string representation of of boost::any value?
for example, is the following approach correct?
boost::any t(2);
std::string str = boost::any_cast<std::string>(t);
In addition, from searching archieves I understand that there is no
serialization for boost::any. Currently I plan to examine "name" in type_info
returned from boost::any::type() and serialize accordingly. I'll appreciate
any advise for better approach.
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