Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2001-05-24 16:16:28

on 5/24/01 11:58 AM, Ross Smith at ross.s_at_[hidden] wrote:

> Recent changes to Cygwin have created minor breakage in Boost's limits header.
> The code for wchar_t currently looks like this:
> #ifndef _WIN32
> template<>
> class numeric_limits<wchar_t>
> : public _Integer_limits<wchar_t, INT_MIN, INT_MAX>
> {};
> #else
> class numeric_limits<wchar_t>
> : public _Integer_limits<wchar_t, 0, USHRT_MAX>
> {};
> #endif
> Translation: assume equivalence to unsigned short on Windows, signed int on
> anything else. This falls down now because Cygwin's GCC defaults to -mno-win32
> mode, in which _WIN32 isn't defined but wchar_t is still 16 bits.
> The fix should be trivial:
[SNIP proposed fix]

I think you're skipping something basic: there are limit macros for wchar_t!
The macros WCHAR_MIN and WCHAR_MAX are #defined in <cwchar> instead.

Furthermore, you should check the BOOST_NO_INTRINSIC_WCHAR_T macro in
<boost/config.hpp> to make sure this specialization should be done.

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

Boost list run by bdawes at, gregod at, cpdaniel at, john at