Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2003-12-03 15:28:55


On 11/30/03 8:00 AM, "John Maddock" <john_at_[hidden]> wrote:

>> The problem is that we have tests which fail because of it. I adjusted
>> counting_iterator to supply a specialization for is_numeric<wchar_t>, which
>> was previously looking at numeric_limits<wchar_t>::is_specialized.
>
> That's a pain, thinking about it, I guess STLPort has the same problem that we
> have: it can't tell whether wchar_t is a native type or not for that compiler.

What's wrong with:

template < typename T >
struct is_wchart_specialized
{
    BOOST_STATIC_CONSTANT( bool, value = true );
};

template < >
struct is_wchart_specialized<unsigned char>
{
    BOOST_STATIC_CONSTANT( bool, value = false );
};

//...

template < >
struct is_wchart_specialized<unsigned long>
{
    BOOST_STATIC_CONSTANT( bool, value = false );
};

Then checking "is_wchart_specialized<wchar_t>::value"? (Of course, this
only works at regular compiler time, not preprocessor time.)

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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk