Usage of INT_MAX, etc.
thiago at kde.org
Tue Oct 24 23:28:16 BST 2006
Jaroslaw Staniek wrote:
>What I now propose is to make docs and function signatures shorter by
> defining things like
> #define INT32_MAX numeric_limit<int32_t>::max()
Only in docs.
Don't define that in C++ code, since that requires int32_t, which isn't
always present. It also requires #include <limits> and "using namespace
Also note that you don't need to define INT32_MAX to a call to
numeric_limit::max. For 32 bits exactly, MAX is (2^31)-1 and MIN
So I feel this #define is unnecessary.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel