
4 Mar
2011
4 Mar
'11
5:52 p.m.
On 3/4/2011 5:36 PM, Sebastian Redl wrote:
On 04.03.2011, at 17:15, Daniel Larimer wrote:
It would be possible to implement dynamic_any_cast for the existing boost::any by using compiler-specific implementation knowledge. For example, on GCC, you could access type_info::__do_upcast to do the casting.
Maybe the traits I suggested long time ago could solve this problem in some variant. http://www.comeaucomputing.com/iso/lwg-active.html#849 That is, if we could determine a suitable root class with a virtual function, we could simply instantiate holder<root*>. (this would also generate less code). Wold not work if there is no unique base class I guess; -Thorsten