incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: //stdcxx/trunk/tests/localization/22_synopsis.cpp
Date Mon, 21 Apr 2008 16:49:57 GMT
Eric Lemings wrote:
>  
> 
>> -----Original Message-----
>> From: Eric Lemings 
>> Sent: Monday, April 21, 2008 9:43 AM
>> To: Martin Sebor; Travis Vitek
>> Subject: RE: //stdcxx/trunk/tests/localization/22_synopsis.cpp
>>
>>  
>>
>>> -----Original Message-----
>>> From: Martin Sebor [mailto:sebor@roguewave.com] 
>>> Sent: Friday, April 18, 2008 2:20 PM
>>> To: Travis Vitek
>>> Cc: Eric Lemings
>>> Subject: Re: //stdcxx/trunk/tests/localization/22_synopsis.cpp
>>>
>>> Travis Vitek wrote:
>>>>  
>>>>
>>>>> Eric Lemings wrote:
>>>>>
>>>>>
>>>>> In the array initialization of lc_defs, there's a null string 
>>>>> before "LC_MESSAGES".  Is that a typo?
>>>>>
>>>>>
>>>> It won't hurt anything. That code is there to make sure 
>>> that the LC_*
>>>> constants aren't pulled in when including <locale>. The 
>>> only assertion
>>>> that uses the array just iterates over it asserting for 
>>> non-null values.
>>>> I'd probably opt to remove the null, but that's just me.
>>>>
>>>> I'm actually quite interested to know why that test does this...
>>>>
>>>>   #if defined (_RWSTD_NO_EXPORT) && !defined (_MSC_VER)
>>>>      // make protected members accessible if possible
>>>>   #  define protected public
>>>>   #endif
>>>>
>>>> That is just craziness.
>>> http://perforce.cvo.roguewave.com/@//@/165436?ac=10
>>>
>>> Martin
>> Why is this dependent on whether _RWSTD_NO_EXPORT is defined?

Because the only compiler that implements the feature (exported
templates), EDG eccp, detects the ODR violation in the hack above
and gives an error.

>> I'm testing with gcc on Linux and this is not defined which
>> in turn leads to compile errors.
> 
> And where is get_locale_category()?  I can't find it anywhere.

See the %{Lc} directive to rw_printf(). Here are some use cases:
http://fisheye6.cenqua.com/browse/stdcxx/trunk/tests/self/0.printf.cpp?r=trunk#l1061

Martin

Mime
View raw message