[petsc-users] Putting petsc in a namespace

Jed Brown jed at jedbrown.org
Mon Sep 8 09:08:29 CDT 2014


Florian Lindner <mailinglists at xgm.de> writes:
>> What do you expect when you put some things in the namespace and 
>> include
>> dependencies outside the namespace?
>
> Well, I have these symbols in the petsc and in the global namespace.

No, the headers have guards so that they are only processed once.  So
the first time you include a file, that is the only place those symbols
will be declared.  And don't try to hack around the header guard because
that is disallowed by the standard (though it might work anyway) and
will cause macro collisions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140908/615bf1bd/attachment.pgp>


More information about the petsc-users mailing list