[EMAIL PROTECTED] wrote:
Author: faridz
Date: Fri Feb 23 09:04:11 2007
New Revision: 511019

URL: http://svn.apache.org/viewvc?view=rev&rev=511019
Log:
2007-02-23 Farid Zaripov <[EMAIL PROTECTED]>

        ChangeLog:
        * 23.list.h: New file with definitions of helpers used in
        clause 23.list tests.
        * 23.containers.cpp: #included 23.list.h; removed definition
        of the temporary struct ListIds; _rw_list_sigcat filled by code.

Added:
    incubator/stdcxx/trunk/tests/include/23.list.h   (with props)
Modified:
    incubator/stdcxx/trunk/tests/src/23.containers.cpp

Added: incubator/stdcxx/trunk/tests/include/23.list.h
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/include/23.list.h?view=auto&rev=511019
==============================================================================
--- incubator/stdcxx/trunk/tests/include/23.list.h (added)
+++ incubator/stdcxx/trunk/tests/include/23.list.h Fri Feb 23 09:04:11 2007
@@ -0,0 +1,285 @@
[...]
+template <class InputIter1, class InputIter2>
+static inline bool
   ^^^^^^

I suspect the static linkage is going to cause the same problem
as in 23.limits.traps. We're already getting warnings from Sun
C++:

CC -c -D_RWSTD_USE_CONFIG -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/../rwtest -I$(TOPDIR)/tests/include -library=%none -O -xarch=v9 +w $(TOPDIR)/tests/src/23.containers.cpp "$(TOPDIR)/tests/include/23.list.h", line 228: Warning (Anachronism): "static" is not allowed and is being ignored.

[...]
+template <class List>
+struct ListState
+{
+    typedef typename List::const_iterator  ListCIter;
+    typedef typename List::const_pointer   ListCPtr;
+
+    _RWSTD_SIZE_T size_;
+    ListCIter*    iters_;
+    ListCPtr*     ptrs_;
+
+    ListState (List const & lst) : size_ (lst.size ()), iters_ (0), ptrs_ (0)
+    {

The formatting convention is not to drop the curly brace in
definitions of member functions in the body of the "parent"
class.

+        iters_ = new ListCIter [size_];
+        ptrs_  = new ListCPtr  [size_];
+
+        _RWSTD_SIZE_T index = 0;
+        for (ListCIter it = lst.begin (), end = lst.end ();
+            it != end; ++it, ++index) {
+
+            iters_ [index] = it;
+            ptrs_  [index] = &*it;
+        }
+    }
+
+    ~ListState ()
+    {

Same here.

+        delete [] iters_;
+        delete [] ptrs_;
+    }
+
+    // invokes rw_assert() to verify that two states are the same
+    void assert_equal (const ListState& state, int line,
+                       int case_line, const char* when) const
+    {

And here.

+        const int equal =    size_ == state.size_

It probably doesn't matter (I don't think any compiler issues
a warning) but I suppose the type of the constant should be int.

Martin

Reply via email to