← Back to team overview

dolfin team mailing list archive

Re: Table

 



Anders Logg wrote:
On Sat, May 09, 2009 at 07:36:46PM +0100, Garth N. Wells wrote:
There is an ambiguity in Table with the two functions:

   void Table::set(std::string row, std::string col, int value);
   void Table::set(std::string row, std::string col, uint value);

since it's not clear which should be called if one does:

   Table table;
   table.set("a", "a", 10);

Garth

It works here. I actually added the uint version to remove an error
message from GCC about ambiguity. If it is not there, the compiler
will have to choose between converting an uint to a char*, double or
int.


I get swig warnings:

dolfin/log/Table.h:52: Warning(509): Overloaded method dolfin::Table::set(std::string,std::string,dolfin::uint) is shadowed by dolfin::Table::set(std::string,std::string,int) at dolfin/log/Table.h:49.

I also get

dolfin/log/Table.h:70: Warning(314): 'print' is a python keyword, renaming to '_print'

Garth

If this does not work, it would mean that it's not possible to
overload int and uint.



------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev




Follow ups

References