dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #09128
Re: Use of inline in .cpp files
Yes, I inline one function which is only used internally. However, it
seems I made a mistake and declared it in the public section of the
class. This function should only be visible internally in the class (was
my intention). Then I suppose it is still appropriate to have it defined
in the cpp file. Can you try to move L117-118 in MTL4Matrix.h to the
private section and see if it works? /Dag
Ola Skavhaug wrote:
> According to:
> http://www.parashift.com/c++-faq-lite/inline-functions.html
>
> Point 9.7:
> "It's usually imperative that the function's definition (the part between the
> {...}) be placed in a header file. If you put the inline function's definition
> into a .cpp file, and if it is called from some other .cpp file, you'll get an
> "unresolved external" error from the linker."
>
> This is currently done in MTL4Matrix. The result is a broken pydolfin build.
>
> Ola
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References