Re: GCC 3.3.1, new warnings with <limits>

From: Marcel Moolenaar <marcel_at_xcllnt.net>
Date: Sun, 13 Jul 2003 11:31:51 -0700
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_at_xcllnt.net
Received on Sun Jul 13 2003 - 09:31:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:15 UTC