On Thu, 15 Jan 2009, Mengda Wu wrote:

>   I used intel compiler to build the latest svn version of libmesh.

Which version?  It compiled fine with icc 10.1.017 for me, but if I've
just inadvertantly broken older Intel compilers I'd definitely like to
fix that.

>   I got the following error in the middle.
>
>   Compiling C++ (in optimized mode) src/numerics/mesh_function.C...
> src/numerics/mesh_function.C(116): error: more than one instance of
> overloaded function "libmesh_assert_cast" matches th
> e argument list:
>            function template "Tnew libmesh_assert_cast<Tnew,Told>(Told &)"
>            function template "Tnew libmesh_assert_cast<Tnew,Told>(Told *)"
>            argument types are: (const FunctionBase *)
>        libmesh_assert_cast<const MeshFunction*>(this->_master);
>        ^
>
> compilation aborted for src/numerics/mesh_function.C (code 2)

So the compiler is seeing a "const MeshFunction*" argument, it's
correctly noting that that could also be passed to a function which
takes "const MeshFunction*&", but it looks like it's not correctly
disambiguating the problem by choosing the most specific template
specialization to use.

Try replacing that line with:
libmesh_assert_cast<const MeshFunction*, const FunctionBase*>(this->master);

But even if that works it's pretty ugly, and I'd hate to have to do it
everywhere.  Anyone have any ideas for a better workaround?
---
Roy

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to