To revisit the discussion on casting last week... I just ran across  
this issue:

error: cannot dynamic_cast ‘oldvar’ (of type ‘void*’) to type ‘class  
Preconditioner<Number>*’ (source is not a pointer to class)

The offending code is:

   PetscErrorCode __libmesh_petsc_preconditioner_setup (void * ctx)
   {
     Preconditioner<Number> * preconditioner =  
libmesh_cast_ptr<Preconditioner<Number>*>(ctx);
.....

I only get this error in debug (obviously... since a static cast is  
done in optimized).

Why can't you cast a void pointer to a class pointer dynamically?   
Seems odd to me... so I'm probably doing something wrong.

Derek
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to