[Gecode] Some issues in the code you contributed...

Christian Schulte schulte at imit.kth.se
Sat May 1 13:57:15 CEST 2004


Dear all,

I stumbled over the following two issues and some minor stuff:

If you have a template <class A, class B>, then you can't have a template
<class A, class A>. First of all, this awkward construction is not
necessary, if you want to have that better iterator, then just give it a
different name. Grep for #ifdef FUCKED. Your code might not compile/work
right now.

The max and min double values are exactly those for which floating point
arithmetic is exact. Basing the configuration on the fact that long long is
64 bits is worse than using the predefined constant (which is guaranteed by
the C++ standard afaik).

Then please:

NO C STYLE CASTS, NOWHERE. READ AND UNDERSTAND CASTS IN C++ (Denys will
agree with me that C-style casts actually put Mozart in big shit, I won't
have that again).

NO FUNKY LAYOUT! Fact is, do it as I did it (I know that's tough luck, but
such is life).

Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 




More information about the gecode-users mailing list