On 6/21/10 1:49 PM, John Peterson wrote:
> On Mon, Jun 21, 2010 at 11:35 AM, Roy Stogner<royst...@ices.utexas.edu>  
> wrote:
>> I'd been kind of hoping that we'd be able to get away with the same in
>> library code (in our .C files, albeit not our .h files), but I guess
>> if even PETSc might have new encroaching identifiers then we've got to
>> be careful - anything that includes a third party header (even
>> indirectly...) shouldn't use any non-explicitly-namespaced symbols.
>
> Right, and what if someone wants to write Sieve code (if this makes
> sense?) within an otherwise libmesh source file, foo.C?
>
> <code>
> #include<petscmesh.h>
> #include "mesh.h" // LibMesh's Mesh, assume properly namespaced
> using namespace LibMesh;
>
> Mesh mesh; // How to access Sieve's Mesh?
> </code>
>
> With the using declaration, they'd have no way to access it, right?

Assuming it is in the global namespace, I believe that one could do:

    Mesh libmesh_mesh;
    ::Mesh sieve_mesh;

-- Boyce

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to