|
Boost Users : |
From: troy d. straszheim (troy_at_[hidden])
Date: 2008-08-09 17:17:12
Robert Ramey wrote:
> troy d. straszheim wrote:
>>> Hey,
>>>
>>> Here's an autoregistering serializable any, I think it qualifies as
>>> hacky
>>> and suboptimal. Of course the typeid(T).name() strings aren't
>>> portable,
>
> if you use serialization/extended_type_info, instead of typeid(T)name()
> you can use the strings used by BOOST_CLASS_EXPORT which are portable.
Hm, I don't quite follow...
BOOST_CLASS_EXPORT(T)
just associates "T" with typename T. Maybe one could cobble together
something like
BOOST_ANY_EXPORT(U)
which would expand to something like
BOOST_CLASS_EXPORT_GUID(boost::any::holder<U>, "boost_any_holder_" BOOST_PP_STRINGIZE(U))
But one of the OP's requirements was that a list of instantiations of
anys not be necessary. Do we want to toss that requirement
in favor of moving closer to something that could actually go into the
library... or what am I missing?
-t
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