incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nico...@roguewave.com>
Subject Re: r. 380238 broken
Date Thu, 23 Feb 2006 22:22:12 GMT
Could it be that the _RWSTD_INSTANTIATE_type macros are defined to 1
when instantiation is needed but not to 0 otherwise?

Liviu

Liviu Nicoara wrote:
> It seems I rushed to a wrong conclusion - I haven't noticed the
> definitions for _RWSTD_INSTANTIATE_type's macros. Scratch the diff since
>  it leads to unsats because of the lack of type instantiations in the
> library. Martin, any off-the-shelf ideas as to why I get this:
> 
> In file included from /build/nicoara/stdcxx/include/ios:29,
>                  from /build/nicoara/stdcxx/src/strstream.cpp:38:
> /build/nicoara/stdcxx/include/rw/_basic_ios.h:339:42: operator '!' has
> no right operand
> /build/nicoara/stdcxx/include/rw/_basic_ios.h:346:45: operator '!' has
> no right operand
> ?
> 
> Liviu
> 
> Liviu Nicoara wrote:
> 
>>Revision 380238 seems to be broken at least on Linux. I believe the
>>intention in rw/_defs.h conditionals was to test for the definition of
>>the macros in the diff below since stdcxx does not define config macros
>>to values (0/1) as a matter of policy.
>>
>>I changed all instances where the conditional tests for the macro value
>>and it builds:
>>
>>$ svn diff
>>Index: include/rw/_defs.h
>>===================================================================
>>--- include/rw/_defs.h  (revision 380233)
>>+++ include/rw/_defs.h  (working copy)
>>@@ -1310,10 +1310,10 @@
>>     && !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION)   \
>>     && !defined (_RWSTD_NO_INSTANTIATE)
>>
>>-#  define _RWSTD_INSTANTIATE(name, type)   \
>>-       (   _RWSTD_INSTANTIATE ## name      \
>>-        && _RWSTD_INSTANTIATE ## type      \
>>-        && !_RWSTD_NO ## type)
>>+#  define _RWSTD_INSTANTIATE(name, type)                \
>>+       (    defined (_RWSTD_INSTANTIATE ## name)        \
>>+        &&  defined (_RWSTD_INSTANTIATE ## type)        \
>>+        && !defined (_RWSTD_NO ## type))
>>
>> #  define _RWSTD_INSTANTIATE_1(arg)          template arg
>> #  define _RWSTD_INSTANTIATE_2(a1, a2)       template a1, a2
>>@@ -1336,7 +1336,7 @@
>>    //         'extern' before template explicit instantiation
>> #  pragma warning (disable: 4231)
>>
>>-#  define _RWSTD_INSTANTIATE(ign1, type)   (!_RWSTD_NO ## type)
>>+#  define _RWSTD_INSTANTIATE(ign1, type)   (!defined (_RWSTD_NO ## type))
>>
>> #  define _RWSTD_INSTANTIATE_1(arg)        extern template arg
>> #  define _RWSTD_INSTANTIATE_2(a1, a2)     extern template a1, a2
>>@@ -1345,7 +1345,7 @@
>>    // use the extern template extension to declare template
>>    // specializations that are explicitly instantiated in
>>    // source (.cpp) files
>>-#  define _RWSTD_INSTANTIATE(ign1, type)   (!_RWSTD_NO ## type)
>>+#  define _RWSTD_INSTANTIATE(ign1, type)   (!defined (_RWSTD_NO ## type))
>> #  define _RWSTD_INSTANTIATE_1(arg)        extern template arg
>> #  define _RWSTD_INSTANTIATE_2(a1, a2)     extern template a1, a2
>> #  define _RWSTD_INSTANTIATE_3(a1, a2, a3) extern template a1, a2, a3
>>
> 
> 


Mime
View raw message