Here's a test that exercises that the library doesn't use common
names from the user namespace:
http://svn.apache.org/viewvc?view=rev&rev=451825

Martin


Martin Sebor wrote:
[EMAIL PROTECTED] wrote:

Author: faridz
Date: Fri Sep 29 06:06:27 2006
New Revision: 451275

URL: http://svn.apache.org/viewvc?view=rev&rev=451275


Whoops. I see I missed somthing in this patch that I should have
pointed out:

[...]

URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_select.h?view=diff&rev=451275&r1=451274&r2=451275 ==============================================================================
--- incubator/stdcxx/trunk/include/rw/_select.h (original)
+++ incubator/stdcxx/trunk/include/rw/_select.h Fri Sep 29 06:06:27 2006
@@ -108,23 +108,35 @@

[...]

-#  endif   // _RWSTD_NO_WCHAR_T
+template <class _TypeT, class _TypeU>
+struct __rw_is_same
+{
+    struct yes {};
+    struct no { yes no_ [2]; };
+    template <class T>
+    struct Type {};
+
+    static yes test (Type<_TypeT>, Type<_TypeT>);
+    static no test (...);


All these names should be privatized so as to prevent clashes with
user-defined macros. I.e., the template parameter T should be renamed
to _TypeV, yes and no to _C_yes and _C_no (C for class member), and
test to _C_test.

Martin

Reply via email to