Date: Sun, 13 Jul 2003 11:31:51 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: David Leimbach <leimy2k@mac.com> Cc: freebsd-current@freebsd.org Subject: Re: GCC 3.3.1, new warnings with <limits> Message-ID: <20030713183151.GA78045@dhcp01.pn.xcllnt.net> In-Reply-To: <401FAE5E-B535-11D7-BE3B-0003937E39E0@mac.com> References: <20030712155333.GA79322@crodrigues.org> <BEDC8C48-B4DC-11D7-BE3B-0003937E39E0@mac.com> <20030713031312.GA89014@crodrigues.org> <20030713000559.28c18be6.kabaev@mail.ru> <401FAE5E-B535-11D7-BE3B-0003937E39E0@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 13, 2003 at 08:23:54AM -0500, David Leimbach wrote: > > This is a good policy in general, however, one could easily argue that > what > is trying to be determined with signedness and such being > less-than-compared > to 0 isn't really a big deal and possibly the only way to implement this > numeric_limits<T>::digits thing without any type introspection which > C++ currently > lacks. What about? #define issigned(T) (((T)(0)>(T)(~0)) ? 1 : 0) -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030713183151.GA78045>
