From: "Johan Nilsson" <[EMAIL PROTECTED]>
[...]
> template<typename T>
> T* dynamic_void_cast(void* pv)
> {
>   struct rtti_obj__
>   {
>     virtual ~rtti_obj__() = 0;
>   };
>
>   rtti_obj__* pro = static_cast<rtti_obj__*>(pv);
>
>   try
>   {
>     return dynamic_cast<T*>(pro);
>   }

This is not required to work. T's vtable pointer is not guaranteed to be at
offset 0.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to