You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by fa...@apache.org on 2006/11/28 11:23:58 UTC

svn commit: r479979 - /incubator/stdcxx/trunk/include/vector

Author: faridz
Date: Tue Nov 28 02:23:57 2006
New Revision: 479979

URL: http://svn.apache.org/viewvc?view=rev&rev=479979
Log:
2006-11-28 Farid Zaripov <fa...@kyiv.vdiweb.com>

	* vector (vector<bool, _Allocator>): Removed _VB_TYPENAME macro.
	[_RWSTD_NO_CLASS_PARTIAL_SPEC && !_RWSTD_NO_TYPENAME]: _TYPENAME
	cleared before types definitions and restored after.

Modified:
    incubator/stdcxx/trunk/include/vector

Modified: incubator/stdcxx/trunk/include/vector
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/vector?view=diff&rev=479979&r1=479978&r2=479979
==============================================================================
--- incubator/stdcxx/trunk/include/vector (original)
+++ incubator/stdcxx/trunk/include/vector Tue Nov 28 02:23:57 2006
@@ -729,16 +729,12 @@
 
 #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
 
-#  define _VB_TYPENAME   _TYPENAME
-
 _EXPORT
 template <class _Allocator>
 class
 
 #else   // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
 
-#  define _VB_TYPENAME
-
      // use a macro to mutate _Allocator into allocator<bool>
 # define _Allocator allocator<bool>
 
@@ -749,6 +745,12 @@
 
 vector<bool, _Allocator >: private _Allocator
 {
+#if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) && !defined (_RWSTD_NO_TYPENAME)
+    // clear _TYPENAME
+#  undef _TYPENAME
+#  define _TYPENAME
+#endif  // _RWSTD_NO_CLASS_PARTIAL_SPEC && !_RWSTD_NO_TYPENAME
+
     typedef _RWSTD_REBIND(_Allocator, unsigned int)       _C_value_alloc_type;
     typedef vector                                        _C_self;
 public:
@@ -756,10 +758,16 @@
     typedef _Allocator                                      allocator_type;
     typedef bool                                            value_type;
 
-    typedef _VB_TYPENAME allocator_type::size_type          size_type;
-    typedef _VB_TYPENAME allocator_type::difference_type    difference_type;
-    typedef _VB_TYPENAME _C_value_alloc_type::pointer       pointer;
-    typedef _VB_TYPENAME _C_value_alloc_type::const_pointer const_pointer;
+    typedef _TYPENAME allocator_type::size_type             size_type;
+    typedef _TYPENAME allocator_type::difference_type       difference_type;
+    typedef _TYPENAME _C_value_alloc_type::pointer          pointer;
+    typedef _TYPENAME _C_value_alloc_type::const_pointer    const_pointer;
+
+#if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) && !defined (_RWSTD_NO_TYPENAME)
+    // restore _TYPENAME
+#  undef _TYPENAME
+#  define _TYPENAME   typename
+#endif  // _RWSTD_NO_CLASS_PARTIAL_SPEC && !_RWSTD_NO_TYPENAME
 
     class iterator;
     class const_iterator;