Closed vexorian closed 11 years ago
Yeah, the .LongInteger field was working fine until I noticed that if a function's arguments use vector
The new commit adds templates.cpp.longLongName to config so now the "long long" can just be replaced.
A nice extension point. Actually, I don't think I like your preferences on 64-bit integer types in C++, because long
is guaranteed to be 64-bit in some platform, although in the topcoder environment long
is actually 64-bit.
But, in my opinion, greed affords this configuration point. A suggestion: use suffix longTypeName
instead of longLongName
, since this is much more generic form across all the other languages.
Well, in the patch only c++ has this option, it doesn't seem worth it to add it to the other languages because they don't allow changing type names anyway. I will rename it longTypeName though, it is easier to read.
Hello, this very minor tweak is related to issue: http://github.com/shivawu/topcoder-greed/issues/34
By allowing to use .LongInteger in conditions, We can detect 64 bits integers in the templates. I added this so I can make greed write "long" instead of "long long" in my c++ template. This will also allow the tester template to do some things different if needed in case the type is long.