stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r509951 - /incubator/stdcxx/trunk/tests/include/alg_test.h
Date Wed, 21 Feb 2007 09:40:42 GMT
Author: faridz
Date: Wed Feb 21 01:40:39 2007
New Revision: 509951

URL: http://svn.apache.org/viewvc?view=rev&rev=509951
Log:
2007-02-21 Farid Zaripov <faridz@kyiv.vdiweb.com>

	ChangeLog:
	STDCXX-341
	* alg_test.h: ConstFwdIter<T> inherited from FwdIter<const T>.
	ConstBidirIter<T> inherited from BidirIter<const T>.
	ConstRandomAccessIter<T> inherited from RandomAccessIter<const T>.
	(make_iter): type of the last parameter changed to const reference

Modified:
    incubator/stdcxx/trunk/tests/include/alg_test.h

Modified: incubator/stdcxx/trunk/tests/include/alg_test.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/include/alg_test.h?view=diff&rev=509951&r1=509950&r2=509951
==============================================================================
--- incubator/stdcxx/trunk/tests/include/alg_test.h (original)
+++ incubator/stdcxx/trunk/tests/include/alg_test.h Wed Feb 21 01:40:39 2007
@@ -685,17 +685,17 @@
 
 
 template <class T>
-struct ConstFwdIter: FwdIter<T>
+struct ConstFwdIter: FwdIter<const T>
 {
-    typedef T                   value_type;
-    typedef FwdIter<value_type> Base;
+    typedef T                         value_type;
+    typedef FwdIter<const value_type> Base;
 
     ConstFwdIter (): Base () { }
 
     ConstFwdIter (const value_type *cur,
                   const value_type *begin,
                   const value_type *end)
-        : Base (_RWSTD_CONST_CAST (value_type*, cur), begin, end) { }
+        : Base (cur, begin, end) { }
 
     const value_type& operator* () const {
         return Base::operator* ();
@@ -780,17 +780,17 @@
 
 
 template <class T>
-struct ConstBidirIter: BidirIter<T>
+struct ConstBidirIter: BidirIter<const T>
 {
-    typedef T                     value_type;
-    typedef BidirIter<value_type> Base;
+    typedef T                           value_type;
+    typedef BidirIter<const value_type> Base;
 
     ConstBidirIter (): Base () { }
 
     ConstBidirIter (const value_type *cur,
                     const value_type *begin,
                     const value_type *end)
-        : Base (_RWSTD_CONST_CAST (value_type*, cur), begin, end) { }
+        : Base (cur, begin, end) { }
 
     const value_type& operator* () const {
         return Base::operator* ();
@@ -925,18 +925,18 @@
 /**************************************************************************/
 
 template <class T>
-struct ConstRandomAccessIter: RandomAccessIter<T>
+struct ConstRandomAccessIter: RandomAccessIter<const T>
 {
-    typedef T                              value_type;
-    typedef RandomAccessIter<value_type>   Base;
-    typedef typename Base::difference_type difference_type;
+    typedef T                                  value_type;
+    typedef RandomAccessIter<const value_type> Base;
+    typedef typename Base::difference_type     difference_type;
 
     ConstRandomAccessIter (): Base () { }
 
     ConstRandomAccessIter (const value_type *cur,
                            const value_type *begin,
                            const value_type *end)
-        : Base (_RWSTD_CONST_CAST (value_type*, cur), begin, end) { }
+        : Base (cur, begin, end) { }
 
     const value_type& operator* () const {
         return Base::operator* ();
@@ -1007,7 +1007,7 @@
 
 template <class T>
 inline FwdIter<T>
-make_iter (T *cur, const T *begin, const T *end, FwdIter<T>)
+make_iter (T *cur, const T *begin, const T *end, const FwdIter<T>&)
 {
     return FwdIter<T>(cur, begin, end);
 }
@@ -1026,7 +1026,7 @@
 
 template <class T>
 inline ConstFwdIter<T>
-make_iter (const T *cur, const T *begin, const T *end, ConstFwdIter<T>)
+make_iter (const T *cur, const T *begin, const T *end, const ConstFwdIter<T>&)
 {
     return ConstFwdIter<T>(cur, begin, end);
 }
@@ -1045,7 +1045,7 @@
 
 template <class T>
 inline BidirIter<T>
-make_iter (T *cur, const T *begin, const T *end, BidirIter<T>)
+make_iter (T *cur, const T *begin, const T *end, const BidirIter<T>&)
 {
     return BidirIter<T>(cur, begin, end);
 }
@@ -1064,7 +1064,7 @@
 
 template <class T>
 inline ConstBidirIter<T>
-make_iter (const T *cur, const T *begin, const T *end, ConstBidirIter<T>)
+make_iter (const T *cur, const T *begin, const T *end, const ConstBidirIter<T>&)
 {
     return ConstBidirIter<T>(cur, begin, end);
 }
@@ -1083,7 +1083,7 @@
 
 template <class T>
 inline RandomAccessIter<T>
-make_iter (T *cur, const T *begin, const T *end, RandomAccessIter<T>)
+make_iter (T *cur, const T *begin, const T *end, const RandomAccessIter<T>&)
 {
     return RandomAccessIter<T>(cur, begin, end);
 }
@@ -1102,7 +1102,8 @@
 
 template <class T>
 inline ConstRandomAccessIter<T>
-make_iter (const T *cur, const T *begin, const T *end, ConstRandomAccessIter<T>)
+make_iter (const T *cur, const T *begin, const T *end,
+           const ConstRandomAccessIter<T>&)
 {
     return ConstRandomAccessIter<T>(cur, begin, end);
 }



Mime
View raw message