Re: [eigen] patch (enums) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] patch (enums)
- From: Christian Mayer <mail@xxxxxxxxxxxxxxxxx>
- Date: Thu, 10 Jan 2008 20:41:43 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding:sender; bh=wIZuSU8OuNjK7hmKB0CIBuVIIlFno3XNmnaFNP3mB+4=; b=food9pbJmBeeJR5RBj8fY/zgOZVxFYA3MgWGJ4Si8C1snQf4Zwn8z6BjbHJEAo3nUN9H58R4GqXkYxIvl/IvKM/jDVRdUAMujnsZQDidBoNo6ZUUJbZmSCyG7GW62eR+0q3jsPLzJjSakbA+kAmig9/6AlMzIZ8motOxoIm0OUM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding:sender; b=JTVJEMVULPE14TfMCUk7g9dh+ba1THv/unZfe8hXW04tMokIpZSqnAiY0CpPvNojhPcprmMHJXJCcpjCIEkkXufX/IMuIFVJ57FVcYUiMx5H7C158uHBrgsL0cWVB+pikLys77WThy0rDgaQmBZ9nKFFxt5ehv8Y9APfaleP3/Y=
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Benoît Jacob schrieb:
> Hi List,
>
> please find attached the patch for removing the "static const int" everywhere.
> Instead, using enums in classes and #defines for the global constants (just
> to test performance).
>
> [...]
>
> Even if we move to enums I think I will revert the global constants to
> be "const int" instead of defines, as that is really cleaner.
We are using C++ here, so please avoid all #define (as far as possible...)
E.g. a #define usually prevents the IDE from showing the correct values.
And even more important in the few of hardcore C++ programmers: it
allows the compiler to do type checking
CU,
Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHhnT3oWM1JLkHou0RCBDHAJ4gLD9EAA5r9VyWFVsn1EzFaeGCpQCfQRY6
X4I577+ttxF5rS3NJO0P+uE=
=G0ga
-----END PGP SIGNATURE-----