[Carpet] Change to vect<> class
Erik Schnetter
schnetter at cct.lsu.edu
Wed Jun 7 00:41:26 CEST 2006
I plan to push a change to the vect<> class shortly. This should
clean up the API that it provides. If you use the vect class in your
code, then you may need to add some explicit type conversions from
vect<int> to vect<CCTK_REAL> to your code.
Previously, the arithmetic operations (+-*/) were declared as member
functions. This allowed operations like vect<int> + int, but not int
+ vect<int>. I have converted these functions to non-member
functions, which allows both operations. However, at the same time,
implicit type conversions from vect<int> to vect<CCTK_REAL> and vice
versa will not happen any more.
I consider both changes an advantage. Implicit type conversions are
often problematic, because they can happen unintended. However,
being able to say "2 * x" where x is a vector is a natural notation.
I hope that this will not break too much of your code. Please tell
me if you need help correcting syntax errors in your code.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/developers/attachments/20060606/0fc22a9b/attachment.pgp
More information about the developers
mailing list