incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nico...@roguewave.com>
Subject r. 380238 broken
Date Thu, 23 Feb 2006 22:09:35 GMT
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