>> Compiling C++ (in optimized mode) src/mesh/nemesis_io.C...
>> src/mesh/nemesis_io.C: In member function Œvirtual void
>> Nemesis_IO::read(const std::string&)¹:
>> src/mesh/nemesis_io.C:254: error: reference to Œuint¹ is ambiguous
>> /usr/include/sys/types.h:153: error: candidates are: typedef unsigned int
>> uint
>> src/mesh/nemesis_io.C:56: error:                 template<class T> unsigned
>> int<unnamed>::uint(const T&)
> 
> The problem does not appear any more.  I don't know why, but the
> problem is solved.

Thanks.  The issue was some syntax which gcc-4.3 on my laptop accepted, but
gcc-4.2 (at least) did not.

Specifically, I tried to implement the "vector swap trick" from memory as

vec.swap(std::vector<>());

Which does not always work because swap expects a reference, and depending
on compiler the above code may produce a copied value.

The proper implementation is in there now -

std::vector<>().swap(vec);

Which does the right thing.

-Ben


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to