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 2007/02/21 16:58:56 UTC

svn commit: r510071 [3/5] - in /incubator/stdcxx/trunk/tests: algorithms/ containers/ include/ numerics/ self/ src/ utilities/

Modified: incubator/stdcxx/trunk/tests/algorithms/25.set.union.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.set.union.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.set.union.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.set.union.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -23,6 +30,7 @@
 #include <cstddef>      // for size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -66,7 +74,8 @@
 
     // return a type other than bool but one that is implicitly
     // convertible to bool to detect incorrect assumptions
-    conv_to_bool operator() (const X &x, const X &y) /* non-const */ {
+    conv_to_bool operator() (const UserClass &x,
+                             const UserClass &y) /* non-const */ {
         ++funcalls_;
         return conv_to_bool::make (x.val_ < y.val_);
     }
@@ -87,24 +96,25 @@
     const char* iter_names [3];
 
     // pure virtual, must be overridden
-    virtual X*
-    set_union (const X*, const X*, const X*, const X*,
-               X*, X*, const Less*) const = 0;
+    virtual UserClass*
+    set_union (const UserClass*, const UserClass*, const UserClass*,
+               const UserClass*, UserClass*, UserClass*,
+               const Less*) const = 0;
 };
 
 template <class InputIterator1, class InputIterator2, class OutputIterator>
 struct SetUnion: SetUnionBase
 {
     SetUnion () {
-        iter_names [0] = type_name (InputIterator1 (0, 0, 0), (X*)0);
-        iter_names [1] = type_name (InputIterator2 (0, 0, 0), (X*)0);
-        iter_names [2] = type_name (OutputIterator (0, 0, 0), (X*)0);
+        iter_names [0] = type_name (InputIterator1 (0, 0, 0), (UserClass*)0);
+        iter_names [1] = type_name (InputIterator2 (0, 0, 0), (UserClass*)0);
+        iter_names [2] = type_name (OutputIterator (0, 0, 0), (UserClass*)0);
     }
 
-    virtual X*
-    set_union (const X    *xsrc1, const X *xsrc1_end,
-               const X    *xsrc2, const X *xsrc2_end,
-               X          *xdst, X *xdst_end,
+    virtual UserClass*
+    set_union (const UserClass    *xsrc1, const UserClass *xsrc1_end,
+               const UserClass    *xsrc2, const UserClass *xsrc2_end,
+               UserClass          *xdst, UserClass *xdst_end,
                const Less *ppred) const {
 
         const InputIterator1 first1 (xsrc1,     xsrc1, xsrc1_end);
@@ -144,26 +154,28 @@
     const char* const fname   = "set_union";
     const char* const funname = predicate ? "Less" : 0;
 
-    X* const xsrc1 = X::from_char (src1, nsrc1, true /* must be sorted */);
-    X* const xsrc2 = X::from_char (src2, nsrc2, true /* must be sorted */);
+    UserClass* const xsrc1 = UserClass::from_char (src1, nsrc1,
+                                                   true /* must be sorted */);
+    UserClass* const xsrc2 = UserClass::from_char (src2, nsrc2,
+                                                   true /* must be sorted */);
     // assert that the sequences have been successfully created
     RW_ASSERT (0 == nsrc1 || xsrc1);
     RW_ASSERT (0 == nsrc2 || xsrc2);
 
-    X* const xdst = new X [ndst];
+    UserClass* const xdst = new UserClass [ndst];
 
     const int max1_id = nsrc1 > 0 ? xsrc1 [nsrc1 - 1].id_ : -1;
 
-    X* const xsrc1_end = xsrc1 + nsrc1;
-    X* const xsrc2_end = xsrc2 + nsrc2;
-    X* const xdst_end  = xdst + ndst;
+    UserClass* const xsrc1_end = xsrc1 + nsrc1;
+    UserClass* const xsrc2_end = xsrc2 + nsrc2;
+    UserClass* const xdst_end  = xdst + ndst;
 
-    const std::size_t last_n_op_lt = X::n_total_op_lt_;
+    const std::size_t last_n_op_lt = UserClass::n_total_op_lt_;
 
     const Less pred (0, 0);
     const Less* const ppred = predicate ? &pred : 0;
 
-    const X* const xdst_res =
+    const UserClass* const xdst_res =
         alg.set_union (xsrc1, xsrc1_end, xsrc2, xsrc2_end,
                        xdst, xdst_end, ppred);
 
@@ -184,7 +196,7 @@
     }
 
     const std::size_t n_ops_lt = ppred ? 
-        Less::funcalls_ : X::n_total_op_lt_ - last_n_op_lt;
+        Less::funcalls_ : UserClass::n_total_op_lt_ - last_n_op_lt;
 
     // check the algorithm correctness
     std::size_t i = 0;
@@ -319,13 +331,15 @@
                          bool predicate)
 {
     if (0 == rw_opt_no_output_iter)
-        gen_set_union_test (it1, it2, OutputIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, it2, OutputIter<UserClass>(0, 0, 0),
+                            predicate);
     if (0 == rw_opt_no_fwd_iter)
-        gen_set_union_test (it1, it2, FwdIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, it2, FwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
-        gen_set_union_test (it1, it2, BidirIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, it2, BidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
-        gen_set_union_test (it1, it2, RandomAccessIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, it2, RandomAccessIter<UserClass>(0, 0, 0),
+                            predicate);
 }
 
 template <class InputIterator1>
@@ -333,13 +347,14 @@
                          bool                  predicate)
 {
     if (0 == rw_opt_no_input_iter)
-        gen_set_union_test (it1, InputIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, InputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
-        gen_set_union_test (it1, ConstFwdIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, ConstFwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
-        gen_set_union_test (it1, ConstBidirIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, ConstBidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
-        gen_set_union_test (it1, ConstRandomAccessIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (it1, ConstRandomAccessIter<UserClass>(0, 0, 0),
+                            predicate);
 }
 
 // generates a specialization of the set_union test for each of the required
@@ -358,22 +373,23 @@
     if (rw_opt_no_input_iter)
         rw_note (0, 0, 0, "InputIterator test disabled");
     else
-        gen_set_union_test (InputIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (InputIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_fwd_iter)
         rw_note (0, 0, 0, "ForwardIterator test disabled");
     else
-        gen_set_union_test (ConstFwdIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (ConstFwdIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_bidir_iter)
         rw_note (0, 0, 0, "BidirectionalIterator test disabled");
     else
-        gen_set_union_test (ConstBidirIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (ConstBidirIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_rnd_iter)
         rw_note (0, 0, 0, "RandomAccessIterator test disabled");
     else
-        gen_set_union_test (ConstRandomAccessIter<X>(0, 0, 0), predicate);
+        gen_set_union_test (ConstRandomAccessIter<UserClass>(0, 0, 0),
+                            predicate);
 }
 
 /**************************************************************************/

Modified: incubator/stdcxx/trunk/tests/algorithms/25.sort.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.sort.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.sort.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.sort.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -24,6 +31,7 @@
 #include <cstddef>      // for ptrdiff_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -126,7 +134,7 @@
     _RWSTD_UNUSED (last_n_op_cpy);
 
     if (stable) {
-        std::pair<X*, std::ptrdiff_t> dummy;
+        std::pair<UserClass*, std::ptrdiff_t> dummy;
         if (alloc) {
             dummy = std::_GET_TEMP_BUFFER (T, nsrc + 1);
             rw_assert (0 != dummy.first, 0, 0,
@@ -174,7 +182,8 @@
         if (nsrc > 16 && x < x_min)
             x_min = x;
 
-        // complexity: X * N * log (N), ideally with X approaching 1
+        // complexity: UserClass * N * log (N),
+        // ideally with UserClass approaching 1
 
         if (!(nsrc % 20)) {
             rw_info (0, 0, 0,
@@ -182,7 +191,7 @@
                      "|   N  | COMP | COPY |N lg N|   X  | max X| min X|\n"
                      "+======+======+======+======+======+======+======+\n");
 
-            // # | comp | assign | exp. complexity | X | max X |
+            // # | comp | assign | exp. complexity | X | max X | min X
             rw_info (0, 0, 0, "\n|%6d|%6d|%6d|%6d|%6.2f|%6.2f|%6.2f|\n",
                      nsrc + 1, ops, cpy, cmplx, x, x_max, x_min);
         }
@@ -372,16 +381,16 @@
         rw_note (0, __FILE__, __LINE__, "std::sort test disabled");
     }
     else {
-        test_sort (N, (X*)0, false, false);
+        test_sort (N, (UserClass*)0, false, false);
     }
 
     if (rw_opt_no_stable_sort) {
         rw_note (0, __FILE__, __LINE__, "std::stable_sort test disabled");
     }
     else {
-        test_sort (N, (X*)0, true, false);
+        test_sort (N, (UserClass*)0, true, false);
         // test with memory reallocation
-        test_sort (N, (X*)0, true, true);
+        test_sort (N, (UserClass*)0, true, true);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.swap.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.swap.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.swap.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.swap.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -23,6 +30,7 @@
 #include <cstring>      // for size_t, strlen()
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 
@@ -105,8 +113,8 @@
 void test_iter_swap (ForwardIterator1 it1, ForwardIterator2 it2, 
                      const T*, bool it_swap)
 {
-    const char* const it1name = it_swap ? type_name (it1, (T*)0) : "X";
-    const char* const it2name = it_swap ? type_name (it2, (T*)0) : "X";
+    const char* const it1name = it_swap ? type_name (it1, (T*)0) : "UserClass";
+    const char* const it2name = it_swap ? type_name (it2, (T*)0) : "UserClass";
     const char* const fname   = it_swap ? "iter_swap" : "swap";
 
     rw_info (0, 0, 0, "std::%s (%s, %s)", fname, it1name, it2name);
@@ -325,7 +333,8 @@
     else {
         rw_info (0, 0, 0, "template <class T> void swap (T&, T&)");
 
-        test_iter_swap (FwdIter<X>(), FwdIter<X>(), (X*)0, false);
+        test_iter_swap (FwdIter<UserClass>(), FwdIter<UserClass>(),
+                        (UserClass*)0, false);
     }
 
     if (rw_opt_no_swap_ranges) {
@@ -337,7 +346,7 @@
                  "swap_ranges (%1$s, %1$s, %2$s)",
                  "ForwardIterator1", "ForwardIterator2");
 
-        test_swap ((X*)0, true);
+        test_swap ((UserClass*)0, true);
     }
 
     if (rw_opt_no_iter_swap) {
@@ -348,7 +357,7 @@
                  "template <class %s, class %s> void iter_swap (%1$s, %2$s)",
                  "ForwardIterator1", "ForwardIterator2");
 
-        test_swap ((X*)0, false);
+        test_swap ((UserClass*)0, false);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.transform.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.transform.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.transform.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.transform.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
  *
  **************************************************************************/
 
@@ -23,6 +30,7 @@
 #include <cstddef>      // for size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 
@@ -128,7 +136,7 @@
 OutputIterator
 invoke_transform (InputIterator first, InputIterator last,
                   Unused /* for compatibility with the overload below */,
-                  OutputIterator dest, incT<X> fun)
+                  OutputIterator dest, incT<UserClass> fun)
 {
     return std::transform (first, last, dest, fun);
 }
@@ -137,7 +145,7 @@
 OutputIterator
 invoke_transform (InputIterator1 first1, InputIterator1 last1,
                   InputIterator2 first2,
-                  OutputIterator dest, plusT<X> fun)
+                  OutputIterator dest, plusT<UserClass> fun)
 {
     return std::transform (first1, last1, first2, dest, fun);
 }
@@ -271,11 +279,11 @@
                int                   tag3,
                int                   same_seq)
 {
-    const InputIter<X>        input_iter (0, 0, 0);
+    const InputIter<UserClass>        input_iter (0, 0, 0);
     const OutputIter<T>       output_iter (0, 0, 0);
     const FwdIter<T>          fwd_iter (0, 0, 0);
     const BidirIter<T>        bidir_iter (0, 0, 0);
-    const RandomAccessIter<X> rand_iter (0, 0, 0);
+    const RandomAccessIter<UserClass> rand_iter (0, 0, 0);
 
     // tag1, tag2 and tag3 indicates that an iterator needs to be generated
     // at the corresponding position by a recursive call to gen_test
@@ -412,9 +420,9 @@
 static int
 run_test (int, char*[])
 {
-    const InputIter<X>        input_iter (0, 0, 0);
-    const RandomAccessIter<X> rand_iter;
-    const X* const            ptr = 0;
+    const InputIter<UserClass>        input_iter (0, 0, 0);
+    const RandomAccessIter<UserClass> rand_iter;
+    const UserClass* const            ptr = 0;
 
     // test transform with a unary function
     // according to 25.2.3 p5 'result may be equal to first'
@@ -424,7 +432,7 @@
                  "std::transform unary function test disabled");
     }
     else {
-        const incT<X>* const pfun = 0;
+        const incT<UserClass>* const pfun = 0;
 
         gen_test (ptr, input_iter, rand_iter, rand_iter,
                   pfun, 1, 0, 1, 0 /* result distinct from first */);
@@ -444,7 +452,7 @@
                  "std::transform binary function test disabled");
     }
     else {
-        const plusT<X>* const pfun = 0;
+        const plusT<UserClass>* const pfun = 0;
 
         gen_test (ptr, input_iter, rand_iter, rand_iter,
                   pfun, 1, 1, 1, 0 /* result distinct from first{1,2} */);

Modified: incubator/stdcxx/trunk/tests/algorithms/25.unique.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.unique.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.unique.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.unique.cpp Wed Feb 21 07:58:53 2007
@@ -6,29 +6,31 @@
  *
  ***************************************************************************
  *
- * Copyright 2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
  *
- * Copyright 2000-2006 Rogue Wave Software.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2000-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
 #include <algorithm>    // for unique, unique_copy
 #include <cstring>      // for strlen
 
-#include <alg_test.h>   // for BinaryPredicate, X
+#include <alg_test.h>   // for BinaryPredicate
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -351,14 +353,14 @@
         rw_note (0, __FILE__, __LINE__,  "std::unique test disabled");
     }
     else {
-        test_unique ((X*)0, (BinaryPredicate*)0, false);
+        test_unique ((UserClass*)0, (BinaryPredicate*)0, false);
 
         if (rw_opt_no_predicate) {
            rw_note (0, __FILE__, __LINE__,  
                     "std::unique predicate test disabled");
         }
         else {
-            test_unique ((X*)0, &pred, false);
+            test_unique ((UserClass*)0, &pred, false);
         }
     }
 
@@ -366,14 +368,14 @@
         rw_note (0, __FILE__, __LINE__,  "std::unique_copy test disabled");
     }
     else {
-        test_unique ((X*) 0, (BinaryPredicate*)0, true);
+        test_unique ((UserClass*) 0, (BinaryPredicate*)0, true);
 
         if (rw_opt_no_predicate) {
            rw_note (0, __FILE__, __LINE__,  
                     "std::unique_copy predicate test disabled");
         }
         else {
-            test_unique ((X*)0, &pred, true);
+            test_unique ((UserClass*)0, &pred, true);
         }
     }
 

Modified: incubator/stdcxx/trunk/tests/algorithms/25.upper.bound.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.upper.bound.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.upper.bound.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.upper.bound.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -31,16 +38,17 @@
 #include <cstring>      // for strlen()
 
 #include <alg_test.h>   // for iterators
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test(), ...
 
 /**************************************************************************/
 
-// distinct and not Less-Than-Comparable with class X (except as
+// distinct and not Less-Than-Comparable with class UserClass (except as
 // defined below) to detect unwarranted assumptions made by the
 // implementation of the algorithms
 struct Y
 {
-    X xval_;
+    UserClass xval_;
 
     // not Default-Constructible
     Y (int /* dummy */, int /*dummy */): xval_ () { }
@@ -55,13 +63,13 @@
 
 
 inline conv_to_bool
-operator< (const X &lhs, const Y &rhs)
+operator< (const UserClass &lhs, const Y &rhs)
 {
     return conv_to_bool::make (lhs < rhs.xval_);
 }
 
 inline conv_to_bool
-operator< (const Y &lhs, const X &rhs)
+operator< (const Y &lhs, const UserClass &rhs)
 {
     return conv_to_bool::make (lhs.xval_ < rhs);
 }
@@ -77,12 +85,12 @@
 
     // return a type other than bool but one that is implicitly
     // convertible to bool to detect incorrect assumptions
-    conv_to_bool operator() (const X &lhs, const Y &rhs) {
+    conv_to_bool operator() (const UserClass &lhs, const Y &rhs) {
         ++funcalls_;
         return conv_to_bool::make (lhs < rhs.xval_);
     }
 
-    conv_to_bool operator() (const Y &lhs, const X &rhs) {
+    conv_to_bool operator() (const Y &lhs, const UserClass &rhs) {
         ++funcalls_;
         return conv_to_bool::make (lhs.xval_ < rhs);
     }
@@ -108,7 +116,7 @@
     RW_ASSERT (0 != src_str);
 
     const std::size_t nsrc = std::strlen (src_str);
-    X* const xsrc = X::from_char (src_str, nsrc);
+    UserClass* const xsrc = UserClass::from_char (src_str, nsrc);
 
     if (nsrc < result_off)
         result_off = nsrc;
@@ -127,8 +135,8 @@
     // when `predicate' is true
     const LessThan comp (0, 0 /* dummy arguments */);
 
-    // reset the counter of invocations of X::operator<()
-    X::n_total_op_lt_ = 0;
+    // reset the counter of invocations of UserClass::operator<()
+    UserClass::n_total_op_lt_ = 0;
 
     // invoke the appropriate form of the algorithm, storing
     // the resturned value
@@ -151,7 +159,7 @@
 
     // verify complexity
     const std::size_t funcalls = predicate
-        ? LessThan::funcalls_ : X::n_total_op_lt_;
+        ? LessThan::funcalls_ : UserClass::n_total_op_lt_;
 
     rw_assert (funcalls <= ncomp, 0, line,
                "upper_bound(%s = \"%s\", ...%{?}%#c%{;}) complexity: "
@@ -174,7 +182,8 @@
                       std::size_t (comp), (ForwardIterator*)0, \
                       itname, predicate)
 
-    rw_info (0, 0, 0, "std::upper_bound (%s, %1$s, const X&%{?}, %s%{;})",
+    rw_info (0, 0, 0,
+             "std::upper_bound (%s, %1$s, const UserClass&%{?}, %s%{;})",
              itname, predicate, "LessThan");
 
     //    +--------------- source sequence
@@ -223,28 +232,30 @@
 test_upper_bound (bool predicate)
 {
     rw_info (0, 0, 0, "template <class %s, class %s%{?}, class %s%{;}> "
-             "std::upper_bound (%1$s, %1$s, const X&%{?}, %4$s%{;})",
-             "ForwardIterator", "X", predicate, "Compare", predicate);
+             "std::upper_bound (%1$s, %1$s, const UserClass&%{?}, %4$s%{;})",
+             "ForwardIterator", "UserClass", predicate, "Compare", predicate);
 
     if (rw_opt_no_fwd_iter) {
         rw_note (0, 0, 0, "ForwardIterator test disabled");
     }
     else {
-        test_upper_bound ((FwdIter<X>*)0, "ForwardIterator", predicate);
+        test_upper_bound ((FwdIter<UserClass>*)0, "ForwardIterator", predicate);
     }
 
     if (rw_opt_no_bidir_iter) {
         rw_note (0, 0, 0, "BidirectionalIterator test disabled");
     }
     else {
-        test_upper_bound ((BidirIter<X>*)0, "BidirectionalIterator", predicate);
+        test_upper_bound ((BidirIter<UserClass>*)0, "BidirectionalIterator",
+                          predicate);
     }
 
     if (rw_opt_no_fwd_iter) {
         rw_note (0, 0, 0, "RandomAccessIterator test disabled");
     }
     else {
-        test_upper_bound ((RandomAccessIter<X>*)0, "RandomAccessIterator",
+        test_upper_bound ((RandomAccessIter<UserClass>*)0,
+                          "RandomAccessIterator",
                           predicate);
     }
 }

Modified: incubator/stdcxx/trunk/tests/containers/23.deque.modifiers.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/containers/23.deque.modifiers.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/containers/23.deque.modifiers.cpp (original)
+++ incubator/stdcxx/trunk/tests/containers/23.deque.modifiers.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -39,7 +46,7 @@
 #  include <rw_new.h>
 #endif   // _RWSTD_NO_REPLACEABLE_NEW_DELETE
 
-#include <alg_test.h>    // for X
+#include <rw_value.h>    // for UserClass
 #include <driver.h>      // for rw_test(), ...
 #include <rw_printf.h>   // for rw_asnprintf
 
@@ -63,7 +70,7 @@
 
 /**************************************************************************/
 
-typedef std::deque<X, std::allocator<X> > Deque;
+typedef std::deque<UserClass, std::allocator<UserClass> > Deque;
 
 Deque::size_type new_capacity;
 
@@ -114,18 +121,18 @@
 // by throwing an exception; verifies that the exception had no effects
 // on the container
 template <class Iterator>
-void exception_loop (int             line /* line number in caller*/,
-                     MemberFunction  mfun /* deque member function */,
-                     const char     *fcall /* function call string */,
-                     int             exceptions /* enabled exceptions */,
-                     Deque          &deq /* container to call function on */,
+void exception_loop (int              line /* line number in caller*/,
+                     MemberFunction   mfun /* deque member function */,
+                     const char      *fcall /* function call string */,
+                     int              exceptions /* enabled exceptions */,
+                     Deque           &deq /* container to call function on */,
                      const Deque::iterator &it /* iterator into container */,
-                     int             n /* number of elements or offset */,
-                     const X        *x /* pointer to an element or 0 */,
-                     const Iterator &first /* beginning of range */,
-                     const Iterator &last /* end of range to insert */,
-                     int            *n_copy /* number of copy ctors */,
-                     int            *n_asgn /* number of assignments */)
+                     int              n /* number of elements or offset */,
+                     const UserClass *x /* pointer to an element or 0 */,
+                     const Iterator  &first /* beginning of range */,
+                     const Iterator  &last /* end of range to insert */,
+                     int             *n_copy /* number of copy ctors */,
+                     int             *n_asgn /* number of assignments */)
 {
     std::size_t throw_after = 0;
 
@@ -147,13 +154,13 @@
     for ( ; ; ) {
 
         // detect objects constructed but not destroyed after an exception
-        std::size_t x_count = X::count_;
+        std::size_t x_count = UserClass::count_;
 
         _RWSTD_ASSERT (n_copy);
         _RWSTD_ASSERT (n_asgn);
 
-        *n_copy = X::n_total_copy_ctor_;
-        *n_asgn = X::n_total_op_assign_;
+        *n_copy = UserClass::n_total_copy_ctor_;
+        *n_asgn = UserClass::n_total_op_assign_;
 
 #ifndef _RWSTD_NO_EXCEPTIONS
 
@@ -170,11 +177,13 @@
 #  endif   // DEFINE_REPLACEMENT_NEW_AND_DELETE
 
         if (exceptions & CopyCtorThrows) {
-            X::copy_ctor_throw_count_ = X::n_total_copy_ctor_ + throw_after;
+            UserClass::copy_ctor_throw_count_ =
+                UserClass::n_total_copy_ctor_ + throw_after;
         }
 
         if (exceptions & AssignmentThrows) {
-            X::op_assign_throw_count_ = X::n_total_op_assign_ + throw_after;
+            UserClass::op_assign_throw_count_ =
+                UserClass::n_total_op_assign_ + throw_after;
         }
 
 #endif   // _RWSTD_NO_EXCEPTIONS
@@ -234,7 +243,7 @@
             
 
             // count the number of objects to detect leaks
-            x_count = X::count_ - x_count;
+            x_count = UserClass::count_ - x_count;
             rw_assert (x_count == deq.size () - size, 0, line,
                        "line %d: %s: leaked %zu objects after an exception",
                        __LINE__, fcall, x_count - (deq.size () - size));
@@ -252,7 +261,7 @@
         }
 
         // count the number of objects to detect leaks
-        x_count = X::count_ - x_count;
+        x_count = UserClass::count_ - x_count;
         rw_assert (x_count == deq.size () - size, 0, line,
                    "line %d: %s: leaked %zu objects "
                    "after a successful insertion",
@@ -268,13 +277,13 @@
 
 #endif   // DEFINE_REPLACEMENT_NEW_AND_DELETE
 
-    X::copy_ctor_throw_count_ = 0;
-    X::op_assign_throw_count_ = 0;
+    UserClass::copy_ctor_throw_count_ = 0;
+    UserClass::op_assign_throw_count_ = 0;
 
-    // compute the number of calls to X copy ctor and assignment operator
-    // and set `n_copy' and `n_assgn' to the value of the result
-    *n_copy = X::n_total_copy_ctor_ - *n_copy;
-    *n_asgn = X::n_total_op_assign_ - *n_asgn;
+    // compute the number of calls to UserClass copy ctor and assignment
+    // operator and set `n_copy' and `n_assgn' to the value of the result
+    *n_copy = UserClass::n_total_copy_ctor_ - *n_copy;
+    *n_asgn = UserClass::n_total_op_assign_ - *n_asgn;
 }
 
 
@@ -323,8 +332,8 @@
                   const char *res, std::size_t reslen)
 {
     // Ensure that xsrc, xins are always dereferenceable
-    const X* const xseq = X::from_char (seq, seqlen + 1);
-          X* const xins = X::from_char (ins, inslen + 1);
+    const UserClass* const xseq = UserClass::from_char (seq, seqlen + 1);
+          UserClass* const xins = UserClass::from_char (ins, inslen + 1);
 
     Deque deq = seqlen ? Deque (xseq, xseq + seqlen) : Deque ();
 
@@ -350,8 +359,8 @@
                   nelems == -2, *ins, nelems == -1, 
                   int (inslen), -1, xins, nelems, *ins);
 
-    int n_copy = X::n_total_copy_ctor_;
-    int n_asgn = X::n_total_op_assign_;
+    int n_copy = UserClass::n_total_copy_ctor_;
+    int n_asgn = UserClass::n_total_op_assign_;
 
     if (-2 == nelems) {   // insert(iterator, const_reference)
 
@@ -423,7 +432,7 @@
     rw_assert (n_copy == int (expect_copy),
                __FILE__, line,
                "line %d: %s: expected %zu invocations "
-               "of X::X(const X&), got %d\n",
+               "of UserClass::UserClass(const UserClass&), got %d\n",
                __LINE__, funcall, expect_copy, n_copy);
 
     // compute the number of calls to the assignment operator
@@ -433,7 +442,7 @@
     rw_assert (n_asgn == int (expect_asgn), 
                __FILE__, line,
                "line %d: %s: expected %zu invocations "
-               "of X::operator=(const X&), got %d\n",
+               "of UserClass::operator=(const UserClass&), got %d\n",
                __LINE__, funcall, expect_asgn, n_asgn);
 
     // Free funcall storage
@@ -449,7 +458,7 @@
 void test_insert_range (const Iterator &it, const char* itname)
 {
     rw_info (0, 0 ,0, 
-             "std::deque<X>::insert(iterator, %s, %s)", itname, itname);
+             "std::deque<UserClass>::insert(iterator, %s, %s)", itname, itname);
 
 #undef TEST
 #define TEST(seq, off, ins, res)                        \
@@ -604,13 +613,14 @@
     //////////////////////////////////////////////////////////////////
     // exercise deque::insert(iterator, const_reference)
 
-    rw_info (0, 0, 0, "std::deque<X>::insert(iterator, const_reference)");
+    rw_info (0, 0, 0,
+             "std::deque<UserClass>::insert(iterator, const_reference)");
 
 #undef TEST
 #define TEST(seq, off, ins, res) do {                   \
       const char insseq [] = { ins, '\0' };             \
       test_insert (__LINE__, -1,                        \
-                              (X*)0, -2,                \
+                              (UserClass*)0, -2,        \
                               seq, sizeof seq - 1,      \
                               std::size_t (off),        \
                               insseq, 1,                \
@@ -725,14 +735,14 @@
     // exercise deque::insert(iterator, size_type, const_reference)
 
     rw_info (0, 0, 0, 
-             "std::deque<X>::insert(iterator, size_type, "
+             "std::deque<UserClass>::insert(iterator, size_type, "
              "const_reference)");
 
 #undef TEST
 #define TEST(seq, off, n, ins, res) do {                \
       const char insseq [] = { ins, '\0' };             \
       test_insert (__LINE__, -1,                        \
-                              (X*)0, n,                 \
+                              (UserClass*)0, n,         \
                               seq, sizeof seq - 1,      \
                               std::size_t (off),        \
                               insseq, 1,                \
@@ -763,39 +773,41 @@
     // exercise deque::insert(iterator, InputIterator, InputIterator)
 
     rw_info (0, 0, 0, 
-             "template <class InputIterator> std::deque<X>::"
+             "template <class InputIterator> std::deque<UserClass>::"
              "insert(iterator, InputIterator, InputIterator)");
 
     if (0 == rw_opt_no_input_iterator)
-        test_insert_range (InputIter<X>(0, 0, 0), "InputIter<X>");
+        test_insert_range (InputIter<UserClass>(0, 0, 0),
+                           "InputIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::insert(iterator, T, T) "
+                 "std::deque<UserClass>::insert(iterator, T, T) "
                  "[with T = InputIterator] test disabled.");
 
     if (0 == rw_opt_no_forward_iterator)
-        test_insert_range (FwdIter<X>(), "FwdIter<X>");
+        test_insert_range (FwdIter<UserClass>(), "FwdIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::insert(iterator, T, T) "
+                 "std::deque<UserClass>::insert(iterator, T, T) "
                  "[with T = ForwardIterator] test disabled.");
 
     if (0 == rw_opt_no_bidirectional_iterator)
-        test_insert_range (BidirIter<X>(), "BidirIter<X>");
+        test_insert_range (BidirIter<UserClass>(), "BidirIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::insert(iterator, T, T) "
+                 "std::deque<UserClass>::insert(iterator, T, T) "
                  "[with T = BidirectionalIterator] test disabled.");
 
     if (0 == rw_opt_no_random_iterator)
-        test_insert_range (RandomAccessIter<X>(), "RandomAccessIter<X>");
+        test_insert_range (RandomAccessIter<UserClass>(),
+                           "RandomAccessIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::insert(iterator, T, T) "
+                 "std::deque<UserClass>::insert(iterator, T, T) "
                  "[with T = RandomAccessIterator] test disabled."); 
 
     //////////////////////////////////////////////////////////////////
@@ -828,7 +840,7 @@
     else
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::insert(iterator, T, T) "
+                 "std::deque<UserClass>::insert(iterator, T, T) "
                  "[with T = IntegralType] tests disabled."); 
 
 }
@@ -842,8 +854,8 @@
                   const char *asn, std::size_t asnlen,
                   const char *res, std::size_t reslen)
 {
-    const X* const xseq = X::from_char (seq, seqlen + 1);
-          X* const xasn = X::from_char (asn, asnlen + 1);
+    const UserClass* const xseq = UserClass::from_char (seq, seqlen + 1);
+          UserClass* const xasn = UserClass::from_char (asn, asnlen + 1);
 
     Deque deq = seqlen ? Deque (xseq, xseq + seqlen) : Deque ();
 
@@ -860,8 +872,8 @@
                   asnlen, -1, xasn, 
                   nelems, *asn);
 
-    int n_copy = X::n_total_copy_ctor_;
-    int n_asgn = X::n_total_op_assign_;
+    int n_copy = UserClass::n_total_copy_ctor_;
+    int n_asgn = UserClass::n_total_op_assign_;
 
     // create a dummy deque iterator to pass to exception_loop
     // (the object will not be used by the functiuon)
@@ -953,12 +965,12 @@
 
     rw_assert (n_copy == int (expect_copy), 0, line,
                "line %d: %s: expected %zu invocations "
-               "of X::X(const X&), got %d\n",
+               "of UserClass::UserClass(const UserClass&), got %d\n",
                __LINE__, funcall, expect_copy, n_copy);
 
     rw_assert (n_asgn == int (expect_asgn), 0, line,
                "line %d: %s: expected %zu invocations "
-               "of X::operator=(const X&), got %d\n",
+               "of UserClass::operator=(const UserClass&), got %d\n",
                __LINE__, funcall, expect_asgn, n_asgn);
 
     // Free funcall storage
@@ -972,7 +984,7 @@
 template <class Iterator>
 void test_assign_range (const Iterator &it, const char* itname)
 {
-    rw_info (0, 0, 0, "std::deque<X>::assign(%s, %s)", itname, itname);
+    rw_info (0, 0, 0, "std::deque<UserClass>::assign(%s, %s)", itname, itname);
 
     static const char seq[] = "abcdefghijklmnopqrstuvwxyz";
     static const char asn[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -992,7 +1004,8 @@
     // exercise
     //   deque::assign(size_type, const_reference)
 
-    rw_info (0, 0, 0, "std::deque<X>::assign(size_type, const_reference)");
+    rw_info (0, 0, 0,
+             "std::deque<UserClass>::assign(size_type, const_reference)");
 
     static const char seq[] = "abcdefghijklmnopqrstuvwxyz";
     static const char res[] = "AAAAAAAAAAAAAAAAAAAAAAAAAA";
@@ -1000,7 +1013,8 @@
     for (std::size_t i = 0; i != sizeof seq - 1; ++i) {
         for (std::size_t j = 0; j != sizeof seq - 1; ++j) {
 
-            test_assign (__LINE__, -1, (X*)0, int (j), seq, i, res, 1U, res, j);
+            test_assign (__LINE__, -1, (UserClass*)0, int (j),
+                         seq, i, res, 1U, res, j);
         }
     }
 
@@ -1011,39 +1025,41 @@
 
     rw_info (0, 0, 0, 
              "template <class InputIterator> "
-             "std::deque<X>::assign(InputIterator, InputIterator)");
+             "std::deque<UserClass>::assign(InputIterator, InputIterator)");
 
     if (0 == rw_opt_no_input_iterator)
-        test_assign_range (InputIter<X>(0, 0, 0), "InputIter<X>");
+        test_assign_range (InputIter<UserClass>(0, 0, 0),
+                           "InputIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::assign(T, T) [with T = InputIterator]"
+                 "std::deque<UserClass>::assign(T, T) [with T = InputIterator]"
                  "test disabled.");
 
     if (0 == rw_opt_no_forward_iterator)
-        test_assign_range (FwdIter<X>(), "FwdIter<X>");
+        test_assign_range (FwdIter<UserClass>(), "FwdIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::assign(T, T) [with T = ForwardIterator]"
-                 "test disabled.");
+                 "std::deque<UserClass>::assign(T, T) "
+                 "[with T = ForwardIterator] test disabled.");
 
     if (0 == rw_opt_no_bidirectional_iterator)
-        test_assign_range (BidirIter<X>(), "BidirIter<X>");
+        test_assign_range (BidirIter<UserClass>(), "BidirIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::assign(T, T) [with T = BidirectionalIterator]"
-                 "test disabled.");
+                 "std::deque<UserClass>::assign(T, T) "
+                 "[with T = BidirectionalIterator] test disabled.");
 
     if (0 == rw_opt_no_random_iterator)
-        test_assign_range (RandomAccessIter<X>(), "RandomAccessIter<X>");
+        test_assign_range (RandomAccessIter<UserClass>(),
+                           "RandomAccessIter<UserClass>");
     else 
         rw_note (0, 0, __LINE__, 
                  "template <class T> "
-                 "std::deque<X>::assign(T, T) [with T = RandomAccessIterator]"
-                 "test disabled.");
+                 "std::deque<UserClass>::assign(T, T) "
+                 "[with T = RandomAccessIterator] test disabled.");
 }
 
 /**************************************************************************/
@@ -1053,13 +1069,13 @@
                  std::size_t begoff, std::size_t len,
                  const char *res, std::size_t reslen)
 {
-    const X* const xseq = X::from_char (seq, seqlen + 1);
+    const UserClass* const xseq = UserClass::from_char (seq, seqlen + 1);
 
     Deque deq = seqlen ? Deque (xseq, xseq + seqlen) : Deque ();
     const Deque::iterator start = deq.begin () + begoff;
  
-    int n_copy = X::n_total_copy_ctor_;
-    int n_asgn = X::n_total_op_assign_;
+    int n_copy = UserClass::n_total_copy_ctor_;
+    int n_asgn = UserClass::n_total_op_assign_;
 
     char* funcall = 0;
     std::size_t buflen = 0;
@@ -1073,7 +1089,7 @@
                       begoff == deq.size (), begoff, begoff);
         
         exception_loop (line, Erase_1, funcall, 0,
-                        deq, start, 1, 0, (X*)0, (X*)0,
+                        deq, start, 1, 0, (UserClass*)0, (UserClass*)0,
                         &n_copy, &n_asgn);
     }
     else {   // assign(size_type, const_reference)
@@ -1093,7 +1109,7 @@
                       end - deq.begin ());
         
         exception_loop (line, EraseRange, funcall, 0,
-                        deq, start, len, 0, (X*)0, (X*)0,
+                        deq, start, len, 0, (UserClass*)0, (UserClass*)0,
                         &n_copy, &n_asgn);
 
     }
@@ -1151,12 +1167,12 @@
 
     rw_assert (n_copy == int (expect_copy), 0, line,
                "line %d: %s: expected %zu invocations "
-               "of X::X(const X&), got %d\n",
+               "of UserClass::UserClass(const UserClass&), got %d\n",
                __LINE__, funcall, expect_copy, n_copy);
 
     rw_assert (n_asgn == int (expect_asgn), 0, line,
                "line %d: %s: expected %zu invocations "
-               "of X::operator=(const X&), got %d\n",
+               "of UserClass::operator=(const UserClass&), got %d\n",
                __LINE__, funcall, expect_asgn, n_asgn);
 #endif
 
@@ -1170,7 +1186,7 @@
     //////////////////////////////////////////////////////////////////
     // exercise deque::erase(iterator)
 
-    rw_info (0, 0, 0, "std::deque<X>::erase(iterator)");
+    rw_info (0, 0, 0, "std::deque<UserClass>::erase(iterator)");
 
 #undef TEST
 #define TEST(seq, off, res) do {                        \
@@ -1228,7 +1244,7 @@
     //////////////////////////////////////////////////////////////////
     // exercise deque::erase(iterator, iterator)
 
-    rw_info (0, 0, 0, "std::deque<X>::erase(iterator, iterator)");
+    rw_info (0, 0, 0, "std::deque<UserClass>::erase(iterator, iterator)");
 }
 
 /**************************************************************************/
@@ -1274,14 +1290,14 @@
     // *  If the constructor
     //
     //    template <class InputIterator>
-    //    X (InputIterator f, InputIterator l,
+    //    UserClass (InputIterator f, InputIterator l,
     //       const allocator_type& a = allocator_type())
     //
     //    is called with a type InputIterator that does not qualify
     //    as an input iterator, then the constructor will behave
     //    as if the overloaded constructor:
     //
-    //    X (size_type, const value_type& = value_type(),
+    //    UserClass (size_type, const value_type& = value_type(),
     //       const allocator_type& = allocator_type())
     //
     //    were called instead, with the arguments static_cast<size_type>(f),
@@ -1311,8 +1327,8 @@
     //    were called instead, with the same arguments.
     //
     // In the previous paragraph the alternative binding will fail
-    // if f is not implicitly convertible to X::size_type or
-    // if l is not implicitly convertible to X::value_type.
+    // if f is not implicitly convertible to UserClass::size_type or
+    // if l is not implicitly convertible to UserClass::value_type.
     //
     // The extent to which an implementation determines that a type
     // cannot be an input iterator is unspecified, except that
@@ -1362,7 +1378,7 @@
         new_capacity = caps [i];
 
         rw_info (0, 0, 0, 
-                 "__rw::__rw_new_capacity<std::deque<X> >(0) = %zu",
+                 "__rw::__rw_new_capacity<std::deque<UserClass> >(0) = %zu",
                  _RW::__rw_new_capacity (0, (Deque*)0));
 
         if (0 == rw_opt_no_assign)

Modified: incubator/stdcxx/trunk/tests/containers/23.deque.special.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/containers/23.deque.special.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/containers/23.deque.special.cpp (original)
+++ incubator/stdcxx/trunk/tests/containers/23.deque.special.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -23,7 +30,7 @@
 
 #include <cstddef>      // for size_t
 
-#include <alg_test.h>   // for X
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test(), ...
 
 /**************************************************************************/
@@ -76,7 +83,7 @@
 
 /**************************************************************************/
 
-typedef std::deque<X, std::allocator<X> > Deque;
+typedef std::deque<UserClass, std::allocator<UserClass> > Deque;
 
 Deque::size_type new_capacity;
 
@@ -231,7 +238,7 @@
 void test_swap ()
 {
     test_swap ((int*)0, "int");
-    test_swap ((X*)0, "X");
+    test_swap ((UserClass*)0, "UserClass");
 }
 
 /**************************************************************************/
@@ -250,7 +257,7 @@
         new_capacity = caps [i];
 
         rw_info (0, 0, 0, 
-                 "__rw::__rw_new_capacity<std::deque<X> >(0) = %u",
+                 "__rw::__rw_new_capacity<std::deque<UserClass> >(0) = %u",
                  _RW::__rw_new_capacity (0, (Deque*)0));
 
         test_swap ();

Modified: incubator/stdcxx/trunk/tests/containers/23.vector.capacity.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/containers/23.vector.capacity.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/containers/23.vector.capacity.cpp (original)
+++ incubator/stdcxx/trunk/tests/containers/23.vector.capacity.cpp Wed Feb 21 07:58:53 2007
@@ -6,22 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright 2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
  *
- * Copyright 2006 Rogue Wave Software.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2006 Rogue Wave Software.
  *
  **************************************************************************/
 
@@ -29,6 +30,7 @@
 #include <vector>      // for vector
 
 #include <alg_test.h>
+#include <rw_value.h>  // for UserClass
 #include <driver.h>
 
 /**************************************************************************/
@@ -38,7 +40,7 @@
 
 /**************************************************************************/
 
-typedef std::vector<X, std::allocator<X> > Vector;
+typedef std::vector<UserClass, std::allocator<UserClass> > Vector;
 
 // exercise vector<>::capacity() and vector<>::reserve()
 // focus on the complexity of the function
@@ -51,21 +53,21 @@
     const Vector::size_type     size  = v.size ();
           Vector::const_pointer begin = size ? &v [0] : 0;
 
-    X::reset_totals ();
+    UserClass::reset_totals ();
 
     // call reserve capacity that is less than or equal to the current value
     v.reserve (cap / 2);
 
     // verify that the call had no effect
     rw_assert (v.capacity () == cap, 0, __LINE__,
-               "vector<X>(%zu).reserve(%zu); capacity() == %zu, got %zu",
-               nelems, cap / 2, cap, v.capacity ());
+               "vector<UserClass>(%zu).reserve(%zu); capacity() == %zu, "
+               "got %zu", nelems, cap / 2, cap, v.capacity ());
 
     if (size) {
         // verify that no reallocation took place
         rw_assert (begin == &v [0], 0, __LINE__,
-                   "vector<X>(%zu).reserve(%zu) unexpectedly reallocated",
-                   nelems, cap / 2);
+                   "vector<UserClass>(%zu).reserve(%zu) unexpectedly "
+                   "reallocated", nelems, cap / 2);
     }
 
     // call reserve the same capacity as the current value
@@ -73,14 +75,14 @@
 
     // verify that the call had no effect
     rw_assert (v.capacity () == cap, 0, __LINE__,
-               "vector<X>(%zu).reserve(%zu); capacity() == %zu, got %zu",
-               nelems, cap / 2, cap, v.capacity ());
+               "vector<UserClass>(%zu).reserve(%zu); capacity() == %zu, "
+               "got %zu", nelems, cap / 2, cap, v.capacity ());
 
     if (size) {
         // verify that no reallocation took place
         rw_assert (begin == &v [0], 0, __LINE__,
-                   "vector<X>(%zu).reserve(%zu) unexpectedly reallocated",
-                   nelems, cap / 2);
+                   "vector<UserClass>(%zu).reserve(%zu) unexpectedly "
+                   "reallocated", nelems, cap / 2);
     }
 
     // call reserve with a larger capacity then is available
@@ -89,19 +91,19 @@
     // 23.2.4.2, p2: After reserve (), capacity () is greater or equal
     //               to the reserve value if reallocation happens
     rw_assert (v.capacity () >= cap + 1, 0, __LINE__,
-               "vector<X>(%zu).reserve(%zu); capacity() > %zu, got %zu",
+               "vector<UserClass>(%zu).reserve(%zu); capacity() > %zu, got %zu",
                nelems, cap + 1, cap, v.capacity ());
 
     // 23.2.3.2, p3: reserve shall not change the size of the sequence
     rw_assert (v.size () == size, 0, __LINE__,
-               "vector<X>(%zu).reserve(); size() == %zu, got %zu",
+               "vector<UserClass>(%zu).reserve(); size() == %zu, got %zu",
                nelems, size, v.size ());
 
     // 23.2.3.2, p3: takes at most linear time in the size of the sequence
-    rw_assert (X::n_total_copy_ctor_ == v.size (), 0, __LINE__,
-               "vector<X>(%zu).reserve(%zu) complexity: "
+    rw_assert (UserClass::n_total_copy_ctor_ == v.size (), 0, __LINE__,
+               "vector<UserClass>(%zu).reserve(%zu) complexity: "
                "copy ctor called %zu times when size() = %zu",
-               nelems, cap + 1, X::n_total_copy_ctor_, v.size ());
+               nelems, cap + 1, UserClass::n_total_copy_ctor_, v.size ());
 
     if (size) {
         begin = &v [0];
@@ -109,11 +111,11 @@
         // verify 23.2.4.2, p5: no reallocation takes place until
         // the size of the container would exceed its capacity
         for (Vector::size_type i = 0; i != v.capacity () - size; ++i) {
-            v.push_back (X ());
+            v.push_back (UserClass ());
 
             rw_assert (begin == &v [0], 0, __LINE__,
-                       "vector<X>(%zu).reserve(%zu); insertion of element "
-                       "%zu unexpectedly reallocated; size() = %zu",
+                       "vector<UserClass>(%zu).reserve(%zu); insertion of "
+                       "element %zu unexpectedly reallocated; size() = %zu",
                        nelems, cap + 1, v.size ());
         }
     }
@@ -142,12 +144,14 @@
     }
 
     rw_assert (0 != caught, 0, __LINE__,
-               "vector<X>(%zu).reserve(%zu) expected exception not thrown",
+               "vector<UserClass>(%zu).reserve(%zu) "
+               "expected exception not thrown",
                nelems, too_much);
 
     if (caught)
         rw_assert ('\0' == *caught, 0, __LINE__,
-                   "vector<X>(%zu).reserve(%zu) expected length_error, got %s",
+                   "vector<UserClass>(%zu).reserve(%zu) "
+                   "expected length_error, got %s",
                    nelems, too_much, caught);
 
 #endif // _RWSTD_NO_EXCEPTIONS
@@ -159,8 +163,8 @@
 static int
 run_test (int /* argc */, char** /* argv */)
 {
-    rw_info (0, 0, 0, "std::vector<X>::capacity() const");
-    rw_info (0, 0, 0, "std::vector<X>::reserve(size_type)");
+    rw_info (0, 0, 0, "std::vector<UserClass>::capacity() const");
+    rw_info (0, 0, 0, "std::vector<UserClass>::reserve(size_type)");
 
     const Vector::size_type max_elems = Vector::size_type (rw_opt_nloops);
 

Modified: incubator/stdcxx/trunk/tests/containers/23.vector.cons.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/containers/23.vector.cons.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/containers/23.vector.cons.cpp (original)
+++ incubator/stdcxx/trunk/tests/containers/23.vector.cons.cpp Wed Feb 21 07:58:53 2007
@@ -6,22 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright 2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
  *
- * Copyright 2006 Rogue Wave Software.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -31,6 +32,7 @@
 #include <cstddef>     // for size_t
 
 #include <alg_test.h>
+#include <rw_value.h>  // for UserClass
 #include <driver.h>
 #include <rw_new.h>
 
@@ -296,33 +298,33 @@
 // focus on the correct construction and destruction of values
 void test_ctors ()
 {
-    typedef std::vector<X, std::allocator<X> > Vector;
+    typedef std::vector<UserClass, std::allocator<UserClass> > Vector;
 
     if (1) {
 
         rw_info (0, 0, 0,
-                 "std::vector<X>::vector(size_type, "
+                 "std::vector<UserClass>::vector(size_type, "
                  "const_reference, const allocator_type&)");
 
-        rw_info (0, 0, 0, "std::vector<X>::vector(const vector&)");
+        rw_info (0, 0, 0, "std::vector<UserClass>::vector(const vector&)");
 
         // reset function call counters
-        X::reset_totals ();
+        UserClass::reset_totals ();
 
-        // total number of objects of type X in existence
-        const std::size_t x_count = X::count_;
+        // total number of objects of type UserClass in existence
+        const std::size_t x_count = UserClass::count_;
 
         for (Vector::size_type i = 0; i != rw_opt_nloops; ++i) {
 
-            rw_assert (X::count_ == x_count, 0, __LINE__,
-                       "vector<X>::vector(size_type, const_reference); "
+            rw_assert (UserClass::count_ == x_count, 0, __LINE__,
+                       "vector<UserClass>::vector(size_type, const_reference); "
                        "leaked %zu objects of value_type",
-                       X::count_ - x_count);
+                       UserClass::count_ - x_count);
 
             // reset function call counters
-            X::reset_totals ();
+            UserClass::reset_totals ();
 
-            const X val;
+            const UserClass val;
 
             // initialize a vector with `i' copies of `val'
             const Vector v0 (i, val);
@@ -330,17 +332,17 @@
                        && v0.begin ()  + i  == v0.end ()
                        && v0.rbegin () + i  == v0.rend (),
                        0, __LINE__,
-                       "vector<X>::vector(size_type, const_reference)");
+                       "vector<UserClass>::vector(size_type, const_reference)");
 
             // verify that the vector ctor calls only copy ctor
-            // of X and anly the given number of times each
-            rw_assert (X::is_total (i + 1, 1, i, 0, 0, 0), 0, __LINE__,
-                       "vector<X>::vector(size_type, const_reference); "
+            // of UserClass and anly the given number of times each
+            rw_assert (UserClass::is_total (i + 1, 1, i, 0, 0, 0), 0, __LINE__,
+                       "vector<UserClass>::vector(size_type, const_reference); "
                        "called default/copy ctor and operator=() %zu, %zu, "
                        "and %zu times, respectively, 0, %zu, 0 expected",
-                       X::n_total_def_ctor_ - 1,
-                       X::n_total_copy_ctor_,
-                       X::n_total_op_assign_, i);
+                       UserClass::n_total_def_ctor_ - 1,
+                       UserClass::n_total_copy_ctor_,
+                       UserClass::n_total_op_assign_, i);
 
             // create a copy
             Vector v1 (v0);
@@ -348,18 +350,18 @@
                        && v1.begin  () + i == v1.end ()
                        && v1.rbegin () + i == v1.rend (),
                        0, __LINE__,
-                       "vector<X>::vector(const vector&)");
+                       "vector<UserClass>::vector(const vector&)");
 
             // verify that the vector copy ctor calls only copy ctor
-            // of X and anly the given number of times each
-            rw_assert (X::is_total (2 * i + 1, 1, 2 * i, 0, 0, 0),
+            // of UserClass and anly the given number of times each
+            rw_assert (UserClass::is_total (2 * i + 1, 1, 2 * i, 0, 0, 0),
                        0, __LINE__,
-                       "vector<X>::vector(size_type, const_reference); "
+                       "vector<UserClass>::vector(size_type, const_reference); "
                        "called default/copy ctor and operator=() %zu, %zu, "
                        "and %zu times, respectively, 0, %zu, 0 expected",
-                       X::n_total_def_ctor_ - 1,
-                       X::n_total_copy_ctor_,
-                       X::n_total_op_assign_, i);
+                       UserClass::n_total_def_ctor_ - 1,
+                       UserClass::n_total_copy_ctor_,
+                       UserClass::n_total_op_assign_, i);
 
             // exercise vector<>operator=(const vector&)
             Vector v2 (i, val);
@@ -371,10 +373,12 @@
                 // assign a vector (of a possibly unequal size)
                 v3 = v2;
                 rw_assert (v3.size () == v2.size (), 0, __LINE__,
-                           "%zu. vector<X>::operator=(const vector&)", j);
+                           "%zu. vector<UserClass>::operator=(const vector&)",
+                           j);
 
                 rw_assert (v3 == v2, 0, __LINE__,
-                           "%zu. vector<X>::operator=(const vector&)", j);
+                           "%zu. vector<UserClass>::operator=(const vector&)",
+                           j);
             }
 
 #ifndef _RWSTD_NO_EXCEPTIONS
@@ -390,12 +394,13 @@
                 char buf [sizeof (Vector)];
             } buf = { 0 };
 
-            std::size_t x_count_save = X::count_;
+            std::size_t x_count_save = UserClass::count_;
 
             try {
-                // have X copy ctor throw an exception during
+                // have UserClass copy ctor throw an exception during
                 // the copying of the last value
-                X::copy_ctor_throw_count_ = X::n_total_copy_ctor_ + i;
+                UserClass::copy_ctor_throw_count_ =
+                    UserClass::n_total_copy_ctor_ + i;
 
                 // create a vector object, throw an exception
                 // expect vector ctor to destroy any values
@@ -427,19 +432,20 @@
             rw_assert (i == 0 || thrown, 0, __LINE__,
                        "logic error: failed to throw");
 
-            rw_assert (x_count_save == X::count_, 0, __LINE__,
-                       "vector<X>::vector(size_type, const_reference) "
+            rw_assert (x_count_save == UserClass::count_, 0, __LINE__,
+                       "vector<UserClass>::vector(size_type, const_reference) "
                        "leaked %zu value(s) of %zu after an exception",
-                       X::count_ - x_count_save, i);
+                       UserClass::count_ - x_count_save, i);
 
             // exercise vector<>::vector(const vector&)
             thrown       = false;
-            x_count_save = X::count_;
+            x_count_save = UserClass::count_;
 
             try {
-                // have X copy ctor throw an exception during
+                // have UserClass copy ctor throw an exception during
                 // the copying of the last value
-                X::copy_ctor_throw_count_ = X::n_total_copy_ctor_ + i;
+                UserClass::copy_ctor_throw_count_ =
+                    UserClass::n_total_copy_ctor_ + i;
 
                 // use placement new to prevent vector destruction
                 // at scope exit (the object should be destroyed
@@ -467,14 +473,14 @@
             rw_assert(i == 0 || thrown, 0, __LINE__,
                       "logic error: failed to throw");
 
-            rw_assert (x_count_save == X::count_, 0, __LINE__,
-                       "vector<X>::vector(const vector&) leaked "
+            rw_assert (x_count_save == UserClass::count_, 0, __LINE__,
+                       "vector<UserClass>::vector(const vector&) leaked "
                        "%zu value(s) of %zu after an exception",
-                       X::count_ - x_count_save, i);
+                       UserClass::count_ - x_count_save, i);
 
 
             // disable exceptions
-            X::copy_ctor_throw_count_ = std::size_t (-1);
+            UserClass::copy_ctor_throw_count_ = std::size_t (-1);
 
             // remember v1's size and capacity
             const Vector::size_type v1_size = v1.size ();
@@ -488,12 +494,13 @@
 
             // exrecise vector<>::operator=(const vector&)
             thrown       = false;
-            x_count_save = X::count_;
+            x_count_save = UserClass::count_;
 
             try {
-                // have X copy ctor throw an exception during
+                // have UserClass copy ctor throw an exception during
                 // the copying of the last value
-                X::copy_ctor_throw_count_ = X::n_total_copy_ctor_ + v3.size ();
+                UserClass::copy_ctor_throw_count_ =
+                    UserClass::n_total_copy_ctor_ + v3.size ();
 
                 // assign over the existing elements, the last copy ctor or
                 // operator=() throws, destroying all values assigned so far
@@ -505,22 +512,23 @@
             }
 
             // disable exceptions
-            X::copy_ctor_throw_count_ = std::size_t (-1);
+            UserClass::copy_ctor_throw_count_ = std::size_t (-1);
 
             rw_assert (i == 0 || thrown, 0, __LINE__,
                        "logic error: failed to throw");
 
             // verify that no values leaked
-            rw_assert (x_count_save == X::count_, 0, __LINE__,
-                       "vector<X>::vector(const vector&) leaked "
+            rw_assert (x_count_save == UserClass::count_, 0, __LINE__,
+                       "vector<UserClass>::vector(const vector&) leaked "
                        "%zu value(s) of %zu after an exception",
-                       X::count_ - x_count_save, i);
+                       UserClass::count_ - x_count_save, i);
 
             // verify that the size of the left hand size operand
             // of the assignment hasn't changed
             rw_assert (v1.size () == v1_size && v1.capacity () == v1_cap,
-                       0, __LINE__, "vector<X>::operator=(const vector&) "
-                       "changed size of *this from %zu to %zu after exception",
+                       0, __LINE__, "vector<UserClass>::operator="
+                       "(const vector&) changed size of *this from "
+                       "%zu to %zu after exception",
                        i / 2, v3.size ());
 
 #endif   // _RWSTD_NO_EXCEPTIONS
@@ -536,7 +544,8 @@
 {
     if (1) {
 
-        rw_info (0, 0, 0, "std::vector<X>::vector(const allocator_type&)");
+        rw_info (0, 0, 0,
+                 "std::vector<UserClass>::vector(const allocator_type&)");
 
         // verify default ctor arguments
         Vector v0;
@@ -545,18 +554,18 @@
         rw_assert (   0 == v0.size ()
                    && v0.empty () && v0.begin () == v0.end ()
                    && v0.rbegin () == v0.rend (), 0, __LINE__,
-                      ("vector<X>::vector()"));
+                      ("vector<UserClass>::vector()"));
 
         rw_assert (   0 == v1.size ()
                    && v1.empty () && v1.begin () == v1.end ()
                    && v1.rbegin () == v1.rend (), 0, __LINE__,
-                      "vector<X>::vector()");
+                      "vector<UserClass>::vector()");
     }
 
     if (1) {
 
         rw_info (0, 0, 0,
-                 "std::vector<X>::vector(size_type, "
+                 "std::vector<UserClass>::vector(size_type, "
                  "const_reference, const allocator_type&)");
 
         for (typename Vector::size_type i = 0; i != rw_opt_nloops; ++i) {
@@ -570,14 +579,15 @@
                        && v0.begin  () + i == v0.end ()
                        && v0.rbegin () + i == v0.rend (),
                           0, __LINE__,
-                          "vector<X>::vector(size_type, const_reference)");
+                          "vector<UserClass>::vector"
+                          "(size_type, const_reference)");
 
             rw_assert (   i == v1.size ()
                        && v1.begin  () + i == v1.end ()
                        && v1.rbegin () + i == v1.rend (),
                           0, __LINE__,
-                          "vector<X>::vector(size_type, const_reference, "
-                          "const allocator_type&)");
+                          "vector<UserClass>::vector(size_type, "
+                          "const_reference, const allocator_type&)");
 
             bool success = true;
             for (typename Vector::size_type j = 0; j != i; ++j) {
@@ -588,7 +598,7 @@
             }
 
             rw_assert (success, 0, __LINE__,
-                       "vector<X>::vector(size_type, const_reference); "
+                       "vector<UserClass>::vector(size_type, const_reference); "
                        "all elements initialized");
         }
     }
@@ -599,7 +609,7 @@
     if (1) {
 
         rw_info (0, 0, 0,
-                 "template <class InputIterator> std::vector<X>::vector "
+                 "template <class InputIterator> std::vector<UserClass>::vector"
                  "(InputIterator, InputIterator)");
 
         bool success = true;
@@ -649,7 +659,8 @@
 
         rw_assert (success, 0, __LINE__,
                    "template <class InputIterator> "
-                   "std::vector<X>::vector(InputIterator, InputIterator)");
+                   "std::vector<UserClass>::vector"
+                   "(InputIterator, InputIterator)");
 
         // destroy and deallocate...
         for (typename Vector::size_type j = 0; j != rw_opt_nloops; ++j)