stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r510071 [2/5] - in /incubator/stdcxx/trunk/tests: algorithms/ containers/ include/ numerics/ self/ src/ utilities/
Date Wed, 21 Feb 2007 15:58:56 GMT
Modified: incubator/stdcxx/trunk/tests/algorithms/25.merge.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.merge.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.merge.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.merge.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 strlen, size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -79,7 +87,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_);
     }
@@ -103,13 +112,14 @@
     // to the specified arguments and (optionally) with
     // a predicate object
     virtual void
-    inplace_merge (X*, X*, X*, const Less*) const {
+    inplace_merge (UserClass*, UserClass*, UserClass*, const Less*) const {
         RW_ASSERT (!"test logic error");
     }
 
     // invokes merge
-    virtual X*
-    merge (const X*, const X*, const X*, const X*, X*, X*, const Less*) const {
+    virtual UserClass*
+    merge (const UserClass*, const UserClass*, const UserClass*,
+           const UserClass*, UserClass*, UserClass*, const Less*) const {
         RW_ASSERT (!"test logic error");
         return 0;
     }
@@ -119,15 +129,15 @@
 struct Merge: MergeBase
 {
     Merge () {
-        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*
-    merge (const X    *xsrc1, const X *xsrc1_end,
-           const X    *xsrc2, const X *xsrc2_end,
-           X          *xdst, X *xdst_end,
+    virtual UserClass*
+    merge (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);
@@ -153,13 +163,15 @@
 struct InplaceMerge: MergeBase
 {
     InplaceMerge () {
-        iter_names [0] = type_name (BidirectionalIterator (0, 0, 0), (X*)0);
+        iter_names [0] = type_name (BidirectionalIterator (0, 0, 0),
+                                    (UserClass*)0);
         iter_names [1] = 0;
         iter_names [2] = 0;
     }
 
     virtual void
-    inplace_merge (X *xsrc, X *xsrc_mid, X *xsrc_end, const Less *ppred) const {
+    inplace_merge (UserClass *xsrc, UserClass *xsrc_mid, UserClass *xsrc_end,
+                   const Less *ppred) const {
 
         const BidirectionalIterator first (xsrc,     xsrc, xsrc_end);
         const BidirectionalIterator mid   (xsrc_mid, xsrc, xsrc_end);
@@ -192,23 +204,23 @@
     const std::size_t nsrc1 = std::strlen (src1);
     const std::size_t nsrc2 = std::strlen (src2);
 
-    X* const xsrc1 = X::from_char (src1, nsrc1);
-    X* const xsrc2 = X::from_char (src2, nsrc2);
+    UserClass* const xsrc1 = UserClass::from_char (src1, nsrc1);
+    UserClass* const xsrc2 = UserClass::from_char (src2, nsrc2);
 
     const std::size_t ndst = nsrc1 + nsrc2;
-    X* const xdst = inplace ? xsrc1 : new X [ndst];
+    UserClass* const xdst = inplace ? xsrc1 : new UserClass [ndst];
 
-    X* const xsrc1_end = xsrc1 + nsrc1;
-    X* const xsrc2_end = xsrc2 + nsrc2;
-    X* const xsrc_mid  = xsrc1 + midinx;
-    X* const xdst_end  = xdst + ndst;
+    UserClass* const xsrc1_end = xsrc1 + nsrc1;
+    UserClass* const xsrc2_end = xsrc2 + nsrc2;
+    UserClass* const xsrc_mid  = xsrc1 + midinx;
+    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;
 
-    X* xdst_res = 0;
+    UserClass* xdst_res = 0;
 
     if (inplace) {  // inplace_merge
         alg.inplace_merge (xsrc1, xsrc_mid, xsrc1_end, ppred);
@@ -219,7 +231,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;
 
     bool success = true;
 
@@ -436,26 +448,28 @@
                      bool predicate)
 {
     if (0 == rw_opt_no_output_iter)
-        gen_merge_test (it1, it2, OutputIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, it2, OutputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
-        gen_merge_test (it1, it2, FwdIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, it2, FwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
-        gen_merge_test (it1, it2, BidirIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, it2, BidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
-        gen_merge_test (it1, it2, RandomAccessIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, it2, RandomAccessIter<UserClass>(0, 0, 0),
+                        predicate);
 }
 
 template <class InputIterator1>
 void gen_merge_test (const InputIterator1 &it1, bool predicate)
 {
     if (0 == rw_opt_no_input_iter)
-        gen_merge_test (it1, InputIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, InputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
-        gen_merge_test (it1, ConstFwdIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, ConstFwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
-        gen_merge_test (it1, ConstBidirIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, ConstBidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
-        gen_merge_test (it1, ConstRandomAccessIter<X>(0, 0, 0), predicate);
+        gen_merge_test (it1, ConstRandomAccessIter<UserClass>(0, 0, 0),
+                        predicate);
 }
 
 // generates a specialization of the merge test for each of the required
@@ -465,22 +479,22 @@
     if (rw_opt_no_input_iter)
         rw_note (0, 0, 0, "InputIterator test disabled");
     else
-        gen_merge_test (InputIter<X>(0, 0, 0), predicate);
+        gen_merge_test (InputIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_fwd_iter)
         rw_note (0, 0, 0, "ForwardIterator test disabled");
     else
-        gen_merge_test (ConstFwdIter<X>(0, 0, 0), predicate);
+        gen_merge_test (ConstFwdIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_bidir_iter)
         rw_note (0, 0, 0, "BidirectionalIterator test disabled");
     else
-        gen_merge_test (ConstBidirIter<X>(0, 0, 0), predicate);
+        gen_merge_test (ConstBidirIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_rnd_iter)
         rw_note (0, 0, 0, "RandomAccessIterator test disabled");
     else
-        gen_merge_test (ConstRandomAccessIter<X>(0, 0, 0), predicate);
+        gen_merge_test (ConstRandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 /**************************************************************************/
@@ -521,12 +535,13 @@
             if (rw_opt_no_bidir_iter)
                 rw_note (0, 0, 0, "BidirectionalIterator test disabled");
             else
-                gen_inplace_merge_test (BidirIter<X> (0, 0, 0), 1 == i);
+                gen_inplace_merge_test (BidirIter<UserClass> (0, 0, 0), 1 == i);
 
             if (rw_opt_no_rnd_iter)
                 rw_note (0, 0, 0, "RandomAccessIterator test disabled");
             else
-                gen_inplace_merge_test (RandomAccessIter<X> (0, 0, 0), 1 == i);
+                gen_inplace_merge_test (RandomAccessIter<UserClass> (0, 0, 0),
+                                        1 == i);
         }
     }
 

Modified: incubator/stdcxx/trunk/tests/algorithms/25.min.max.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.min.max.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.min.max.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.min.max.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 strlen, size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -120,7 +128,7 @@
                    const Predicate *ppred,
                    bool             test_min)
 {
-    const char* const tname   = "X";
+    const char* const tname   = "UserClass";
     const char* const fname   = test_min ? "min" : "max";
     const char* const funname = Predicate::name();
 
@@ -219,7 +227,7 @@
                    const Predicate *ppred,
                    bool             test_min)
 {
-    const char* const tname = "X";
+    const char* const tname = "UserClass";
     const char* const fname = test_min ? "min" : "max";
     const char* const funname = Predicate::name();
 
@@ -378,13 +386,13 @@
 
 static int run_test (int, char*[])
 {
-    test_alg_min_max ((X*)0, (Less<X>*)0);
+    test_alg_min_max ((UserClass*)0, (Less<UserClass>*)0);
 
     if (rw_opt_no_predicate) {
         rw_note (0, 0, __LINE__, "std.alg.min.max predicate tests disabled");
     }
     else {
-        test_alg_min_max ((X*)0, (Less<X>*)1);
+        test_alg_min_max ((UserClass*)0, (Less<UserClass>*)1);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.mismatch.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.mismatch.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.mismatch.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.mismatch.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 size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()...
 
 /**************************************************************************/
@@ -42,58 +50,59 @@
     rw_info (0, 0, 0, "std::mismatch (%s, %1$s, %s%{?}, %s%{;})",
              it1name, it2name, 0 != predicate, predicate);
 
-    // generate sequential values for each default constructed X
+    // generate sequential values for each default constructed UserClass
     // for both lists
-    X::gen_ = gen_seq_2lists;
+    UserClass::gen_ = gen_seq_2lists;
 
     // use ::operator new() to prevent default initialization
-    X *buf1 = _RWSTD_STATIC_CAST (X*, ::operator new (N * sizeof (X)));
-    X *buf2 = _RWSTD_STATIC_CAST (X*, ::operator new (N * sizeof (X)));
+    const std::size_t size = N * sizeof (UserClass);
+    UserClass *buf1 = _RWSTD_STATIC_CAST (UserClass*, ::operator new (size));
+    UserClass *buf2 = _RWSTD_STATIC_CAST (UserClass*, ::operator new (size));
 
     const std::size_t mid_inx = N / 2;
 
     for (std::size_t i = 0; i != N; ++i) {
 
-        // default-construct a new X at the end of the array
-        new (buf1 + i) X ();
+        // default-construct a new UserClass at the end of the array
+        new (buf1 + i) UserClass ();
 
         // build a nearly identical list only missing N/2 (the N/2th
         // element) from it's list
         if (i != mid_inx)
-            new (buf2 + i) X ();
+            new (buf2 + i) UserClass ();
     }
 
-    new (buf2 + mid_inx) X ();
+    new (buf2 + mid_inx) UserClass ();
 
     for (std::size_t i = 0; i != N; ++i) {
 
         // exercise 25.1.7 - std::mismatch<>()
-        std::size_t last_n_op_eq  = X::n_total_op_eq_;
+        std::size_t last_n_op_eq  = UserClass::n_total_op_eq_;
 
-        X* const buf1_end = buf1 + i + 1;
-        X* const buf2_end = buf2 + i + 1;
+        UserClass* const buf1_end = buf1 + i + 1;
+        UserClass* const buf2_end = buf2 + i + 1;
 
         const InputIterator1 first1 (buf1, buf1, buf1_end);
         const InputIterator1 last1  (buf1_end, buf1_end, buf1_end);
         const InputIterator2 first2 (buf2, buf2, buf2_end);
 
-        const std::equal_to<X> pred = std::equal_to<X>();
+        const std::equal_to<UserClass> pred = std::equal_to<UserClass>();
 
         const std::pair<InputIterator1, InputIterator2> result =
             predicate ? std::mismatch (first1, last1, first2, pred)
                       : std::mismatch (first1, last1, first2);
 
         // verify 25.1.7, p2
-        X* const expected_buf1_end = 
+        UserClass* const expected_buf1_end = 
             (i < mid_inx) ? buf1_end : buf1 + mid_inx;
 
-        X* const expected_buf2_end = 
+        UserClass* const expected_buf2_end = 
             (i < mid_inx) ? buf2_end : buf2 + mid_inx;
 
-        X* const res_buf1_end = 
+        UserClass* const res_buf1_end = 
             buf1 + (result.first.cur_ - first1.cur_);
 
-        X* const res_buf2_end = 
+        UserClass* const res_buf2_end = 
             buf2 + (result.second.cur_ - first2.cur_);
 
         // check that the returned iterators are valid
@@ -123,13 +132,13 @@
                    res_buf2_end->val_, expected_buf2_end->val_);
 
         // verify 25.1.7, p3
-        success = X::n_total_op_eq_ - last_n_op_eq <= (N + 1);
+        success = UserClass::n_total_op_eq_ - last_n_op_eq <= (N + 1);
 
         rw_assert (success, 0, __LINE__, 
                    "%zu. mismatch (%s, %2$s, %s%{?}, %s%{;}): "
                    "complexity: %zu <= %zu",
                    i, it1name, it2name, 0 != predicate, predicate,
-                   X::n_total_op_eq_, i + 1);
+                   UserClass::n_total_op_eq_, i + 1);
 
         if (!success)
             break;
@@ -164,14 +173,16 @@
         rw_note (0, __FILE__, __LINE__, "InputIterator test disabled");
     }
     else {
-        test_mismatch (N, dummy, InputIter<X>(0, 0, 0), (X*)0, predicate);
+        test_mismatch (N, dummy, InputIter<UserClass>(0, 0, 0),
+                       (UserClass*)0, predicate);
     }
 
     if (rw_opt_no_fwd_iter) {
         rw_note (0, __FILE__, __LINE__, "ForwardIterator test disabled");
     }
     else {
-        test_mismatch (N, dummy, FwdIter<X>(), (X*)0, predicate);
+        test_mismatch (N, dummy, FwdIter<UserClass>(),
+                       (UserClass*)0, predicate);
     }
 
     if (rw_opt_no_bidir_iter) {
@@ -179,7 +190,8 @@
             "BidirectionalIterator test disabled");
     }
     else {
-        test_mismatch (N, dummy, BidirIter<X>(), (X*)0, predicate);
+        test_mismatch (N, dummy, BidirIter<UserClass>(),
+                       (UserClass*)0, predicate);
     }
 
     if (rw_opt_no_rnd_iter) {
@@ -187,7 +199,8 @@
             "RandomAccessIterator test disabled");
     }
     else {
-        test_mismatch (N, dummy, RandomAccessIter<X>(), (X*)0, predicate);
+        test_mismatch (N, dummy, RandomAccessIter<UserClass>(),
+                       (UserClass*)0, predicate);
     }
 }
 
@@ -208,15 +221,15 @@
         rw_note (0, __FILE__, __LINE__, "InputIterator test disabled");
     }
     else {
-        test_mismatch (InputIter<X>(0, 0, 0), (X*)0, predicate);
+        test_mismatch (InputIter<UserClass>(0, 0, 0), (UserClass*)0, predicate);
     }
 
     if (rw_opt_no_fwd_iter) {
         rw_note (0, __FILE__, __LINE__, "ForwardIterator test disabled");
     }
     else {
-        test_mismatch (ConstFwdIter<X>(), (X*)0, predicate);
-        test_mismatch (FwdIter<X>(), (X*)0, predicate);
+        test_mismatch (ConstFwdIter<UserClass>(), (UserClass*)0, predicate);
+        test_mismatch (FwdIter<UserClass>(), (UserClass*)0, predicate);
     }
 
     if (rw_opt_no_bidir_iter) {
@@ -224,8 +237,8 @@
             "BidirectionalIterator test disabled");
     }
     else {
-        test_mismatch (ConstBidirIter<X>(), (X*)0, predicate);
-        test_mismatch (BidirIter<X>(), (X*)0, predicate);
+        test_mismatch (ConstBidirIter<UserClass>(), (UserClass*)0, predicate);
+        test_mismatch (BidirIter<UserClass>(), (UserClass*)0, predicate);
     }
 
     if (rw_opt_no_rnd_iter) {
@@ -233,8 +246,9 @@
             "RandomAccessIterator test disabled");
     }
     else {
-        test_mismatch (ConstRandomAccessIter<X>(), (X*)0, predicate);
-        test_mismatch (RandomAccessIter<X>(), (X*)0, predicate);
+        test_mismatch (ConstRandomAccessIter<UserClass>(),
+                       (UserClass*)0, predicate);
+        test_mismatch (RandomAccessIter<UserClass>(), (UserClass*)0, predicate);
     }
 }
 
@@ -249,7 +263,7 @@
         rw_note (0, __FILE__, __LINE__, "Predicate test disabled");
     }
     else {
-        test_mismatch ("std::equal_to<X>");
+        test_mismatch ("std::equal_to<UserClass>");
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.nth.element.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.nth.element.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.nth.element.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.nth.element.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 strlen, size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -267,7 +275,7 @@
              "void std::nth_element (%1$s, %1$s, %1$s)",
              "RandomAccessIterator");
 
-    test_nth_element ((X*)0, (StrictWeakLess<X>*)0);
+    test_nth_element ((UserClass*)0, (StrictWeakLess<UserClass>*)0);
 
     if (rw_opt_no_predicate) {
         rw_note (0, __FILE__, __LINE__, 
@@ -279,8 +287,8 @@
                  "void std::nth_element (%1$s, %1$s, %1$s, %2$s)",
                  "RandomAccessIterator", "StrictWeakLess");
 
-        const StrictWeakLess<X> pred(0, 0);
-        test_nth_element ((X*)0, &pred);
+        const StrictWeakLess<UserClass> pred(0, 0);
+        test_nth_element ((UserClass*)0, &pred);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.partial.sort.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.partial.sort.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.partial.sort.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.partial.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.
  * 
  **************************************************************************/
 
@@ -23,6 +30,7 @@
 #include <cstring>      // for strlen, size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -436,7 +444,7 @@
                  "std::partial_sort test disabled");
     }
     else {
-        test_partial_sort (N, (X*)0, false);
+        test_partial_sort (N, (UserClass*)0, false);
     }
 
     if (rw_opt_no_partial_sort_copy) {
@@ -444,7 +452,7 @@
                  "std::partial_sort_copy test disabled");
     }
     else {
-        test_partial_sort (N, (X*)0, true);
+        test_partial_sort (N, (UserClass*)0, true);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.partitions.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.partitions.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.partitions.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.partitions.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 strlen, size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -310,7 +318,7 @@
         rw_note (0, __FILE__, __LINE__, "std::partition test disabled");
     }
     else {
-        test_partitions ((X*)0, false);
+        test_partitions ((UserClass*)0, false);
     }
 
     if (rw_opt_no_stable_partition) {
@@ -318,7 +326,7 @@
                  "std::stable_partition test disabled");
     }
     else {
-        test_partitions ((X*)0, true);
+        test_partitions ((UserClass*)0, true);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.permutation.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.permutation.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.permutation.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.permutation.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 strlen, size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -251,11 +259,11 @@
     static const RandomAccessIter<T> rand_iter (0, 0, 0);
 
     rw_info (0, 0, 0,
-                 "template <class %s%{?}, class %s%{;}> "
-                 "bool %s (%1$s, %1$s%{?}, %s%{;})",
-                 "BidirectionalIterator", 0 != ppred, "Compare", 
-                 prev ? "prev_permutation" : "next_permutation", 
-                 0 != ppred, "Compare");
+             "template <class %s%{?}, class %s%{;}> "
+             "bool %s (%1$s, %1$s%{?}, %s%{;})",
+             "BidirectionalIterator", 0 != ppred, "Compare", 
+             prev ? "prev_permutation" : "next_permutation", 
+             0 != ppred, "Compare");
 
     if (rw_opt_no_bidir_iter) {
         rw_note (0, 0, __LINE__, "BidirectionalIterator test disabled");
@@ -282,14 +290,14 @@
         rw_note (0, 0, __LINE__, "std::prev_permutation test disabled");
     }
     else {
-        test_permutations ((X*)0, ppred, true); 
+        test_permutations ((UserClass*)0, ppred, true); 
     }
 
     if (rw_opt_no_next_permutation) {
         rw_note (0, 0, __LINE__, "std::next_permutation test disabled");
     }
     else {
-        test_permutations ((X*)0, ppred, false); 
+        test_permutations ((UserClass*)0, ppred, false); 
     }
 }
 
@@ -297,13 +305,13 @@
 
 static int run_test (int, char*[])
 {
-    test_permutations ((X*)0, (Less<X>*)0); 
+    test_permutations ((UserClass*)0, (Less<UserClass>*)0); 
 
     if (rw_opt_no_predicate) {
         rw_note (0, 0, __LINE__, "predicate test disabled");
     }
     else {
-        test_permutations ((X*)0, (Less<X>*)1); 
+        test_permutations ((UserClass*)0, (Less<UserClass>*)1); 
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.random.shuffle.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 memset(), size_t
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 
@@ -358,7 +366,7 @@
 {
     const std::size_t N = std::size_t (rw_opt_nloops);
 
-    typedef RandomAccessIter<X>::difference_type DiffT;
+    typedef RandomAccessIter<UserClass>::difference_type DiffT;
     typedef RandomGenerator<DiffT>               RandGenT;
 
     if (rw_opt_no_random) {
@@ -370,8 +378,8 @@
                  "std::random_shuffle (%1$s, %1$s)",
                  "RandomAccessIterator");
 
-        test_random_shuffle (__LINE__, N, RandomAccessIter<X>(),
-                             (RandGenT*)0, (X*)0, false);
+        test_random_shuffle (__LINE__, N, RandomAccessIter<UserClass>(),
+                             (RandGenT*)0, (UserClass*)0, false);
     }
 
     if (rw_opt_no_rand_test) {
@@ -391,8 +399,8 @@
                  "std::random_shuffle (%1$s, %1$s, %2$s)",
                  "RandomAccessIterator", "RandomNumberGenerator");
 
-        test_random_shuffle (__LINE__, N, RandomAccessIter<X>(),
-                             (RandGenT*)0, (X*)0, true);
+        test_random_shuffle (__LINE__, N, RandomAccessIter<UserClass>(),
+                             (RandGenT*)0, (UserClass*)0, true);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.remove.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.remove.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.remove.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.remove.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,8 @@
 #include <cstring>      // for strlen()
 
 #include <alg_test.h>
-#include <driver.h>      // for rw_test()
+#include <rw_value.h>   // for UserClass
+#include <driver.h>     // for rw_test()
 
 /**************************************************************************/
 
@@ -83,7 +91,7 @@
 // used as a dummy template argument to test functions exercising remove()
 // and remove_if() (to differentiate from remove_copy() and remove_copy_if())
 struct NoIterator { };
-const char* type_name (NoIterator, const X*)
+const char* type_name (NoIterator, const UserClass*)
 {
     return 0;
 }
@@ -579,9 +587,9 @@
 static int
 run_test (int, char*[])
 {
-    test_remove ((X*)0);
+    test_remove ((UserClass*)0);
 
-    test_remove_copy ((X*)0);
+    test_remove_copy ((UserClass*)0);
 
     return 0;
 }

Modified: incubator/stdcxx/trunk/tests/algorithms/25.replace.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.replace.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.replace.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.replace.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()
 
 /**************************************************************************/
@@ -85,7 +93,7 @@
 // used as a dummy template argument to test functions exercising replace()
 // and replace_if() (to differentiate from replace_copy() and replace_copy_if())
 struct NoIterator { };
-const char* type_name (NoIterator, const X*)
+const char* type_name (NoIterator, const UserClass*)
 {
     return 0;
 }
@@ -587,9 +595,9 @@
 static int
 run_test (int, char*[])
 {
-    test_replace ((X*)0);
+    test_replace ((UserClass*)0);
 
-    test_replace_copy ((X*)0);
+    test_replace_copy ((UserClass*)0);
 
     return 0;
 }

Modified: incubator/stdcxx/trunk/tests/algorithms/25.reverse.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.reverse.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.reverse.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.reverse.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()
 
 /**************************************************************************/
@@ -63,7 +71,7 @@
 // used as a dummy template argument to test functions exercising reverse()
 // and reverse_if() (to differentiate from reverse_copy() and reverse_copy_if())
 struct NoIterator { };
-const char* type_name (NoIterator, const X*)
+const char* type_name (NoIterator, const UserClass*)
 {
     return 0;
 }
@@ -75,7 +83,7 @@
 _RWSTD_NAMESPACE (std) {
 
 _RWSTD_SPECIALIZED_FUNCTION
-void iter_swap (BidirIter<X> i, BidirIter<X> j)
+void iter_swap (BidirIter<UserClass> i, BidirIter<UserClass> j)
 {
     ++iter_swap_calls;
 
@@ -86,7 +94,7 @@
 }
 
 _RWSTD_SPECIALIZED_FUNCTION
-void iter_swap (RandomAccessIter<X> i, RandomAccessIter<X> j)
+void iter_swap (RandomAccessIter<UserClass> i, RandomAccessIter<UserClass> j)
 {
     ++iter_swap_calls;
 
@@ -372,14 +380,14 @@
         rw_note (0, __FILE__, __LINE__, "std::reverse test disabled");
     }
     else {
-        test_reverse((X*)0, reverse_tag);
+        test_reverse((UserClass*)0, reverse_tag);
     }
 
     if (rw_opt_no_reverse_copy) {
         rw_note (0, __FILE__, __LINE__, "std::reverse_copy test disabled");
     }
     else {
-        test_reverse_copy((X*)0, reverse_copy_tag);
+        test_reverse_copy((UserClass*)0, reverse_copy_tag);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.rotate.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.rotate.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.rotate.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.rotate.cpp Wed Feb 21 07:58:53 2007
@@ -6,16 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2006 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()
 
 
@@ -65,7 +73,7 @@
 // used as a dummy template argument to test functions exercising rotate()
 // (to differentiate from rotate_copy())
 struct NoIterator { };
-const char* type_name (NoIterator, const X*)
+const char* type_name (NoIterator, const UserClass*)
 {
     return 0;
 }
@@ -78,7 +86,7 @@
 _RWSTD_NAMESPACE (std) {
 
 _RWSTD_SPECIALIZED_FUNCTION
-void iter_swap (FwdIter<X> i, FwdIter<X> j)
+void iter_swap (FwdIter<UserClass> i, FwdIter<UserClass> j)
 {
     ++iter_swap_calls;
 
@@ -90,7 +98,7 @@
 
 
 _RWSTD_SPECIALIZED_FUNCTION
-void iter_swap (BidirIter<X> i, BidirIter<X> j)
+void iter_swap (BidirIter<UserClass> i, BidirIter<UserClass> j)
 {
     ++iter_swap_calls;
 
@@ -102,7 +110,7 @@
 
 
 _RWSTD_SPECIALIZED_FUNCTION
-void iter_swap (RandomAccessIter<X> i, RandomAccessIter<X> j)
+void iter_swap (RandomAccessIter<UserClass> i, RandomAccessIter<UserClass> j)
 {
     ++iter_swap_calls;
 
@@ -410,14 +418,14 @@
         rw_note (0, __FILE__, __LINE__, "std::rotate test disabled");
     }
     else {
-        test_rotate((X*)0, rotate_tag);
+        test_rotate((UserClass*)0, rotate_tag);
     }
 
     if (rw_opt_no_rotate_copy) {
         rw_note (0, __FILE__, __LINE__, "std::rotate_copy test disabled");
     }
     else {
-        test_rotate_copy((X*)0, rotate_copy_tag);
+        test_rotate_copy((UserClass*)0, rotate_copy_tag);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.search.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.search.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.search.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.search.cpp Wed Feb 21 07:58:53 2007
@@ -30,6 +30,7 @@
 #include <cstring>      // for strlen
 
 #include <alg_test.h>
+#include <rw_value.h>   // for UserClass
 #include <driver.h>     // for rw_test()
 
 /**************************************************************************/
@@ -197,10 +198,12 @@
 template <class T>
 std::size_t NonPredicateTag<T>::DummyPredicate::funcalls_;
 
+
 #if defined (_MSC_VER) && _MSC_VER <= 1300
 // to prevent MSVC 7.0 error LNK2001: unresolved external symbol "public:
-// static unsigned int NonPredicateTag<struct X>::DummyPredicate::funcalls_"
-std::size_t NonPredicateTag<X>::DummyPredicate::funcalls_;
+// static unsigned int
+// NonPredicateTag<struct UserClass>::DummyPredicate::funcalls_"
+std::size_t NonPredicateTag<UserClass>::DummyPredicate::funcalls_;
 #endif
 
 /**************************************************************************/
@@ -382,7 +385,7 @@
     const char* const fname = "search_n";
     static const char* const itname  = type_name (it, (T*)0);
     static const char* const szname  = "Size";
-    static const char* const tname   = "X";
+    static const char* const tname   = "UserClass";
     static const char* const predname = 
         pred_tag.pred_inx ? "BinaryPredicate" : "operator <()";
 
@@ -451,7 +454,7 @@
 {
     static const char* const itname   = type_name (it, (T*)0);
     static const char* const szname   = "Size";
-    static const char* const tname    = "X";
+    static const char* const tname    = "UserClass";
     static const char* const predname = "EqualityPredicate";
 
     if (pred_tag.pred_inx) {  // use predicate
@@ -672,14 +675,14 @@
         rw_note (0, __FILE__, __LINE__,  "std::search test disabled");
     }
     else {
-        test_search ((X*)0);
+        test_search ((UserClass*)0);
     }
 
     if (rw_opt_no_search_n) {
         rw_note (0, __FILE__, __LINE__,  "std::search_n test disabled");
     }
     else {
-        test_search_n ((X*)0);
+        test_search_n ((UserClass*)0);
     }
 
     return 0;

Modified: incubator/stdcxx/trunk/tests/algorithms/25.set.difference.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.set.difference.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.set.difference.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.set.difference.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()
 
 /**************************************************************************/
@@ -68,7 +76,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_);
     }
@@ -89,24 +98,25 @@
     const char* iter_names [3];
 
     // pure virtual
-    virtual X*
-    set_difference (const X*, const X*, const X*, const X*, 
-                    X*, X*, const Less*) const = 0;
+    virtual UserClass*
+    set_difference (const UserClass*, const UserClass*, const UserClass*,
+                    const UserClass*, UserClass*, UserClass*,
+                    const Less*) const = 0;
 };
 
 template <class InputIterator1, class InputIterator2, class OutputIterator>
 struct SetDifference: SetDifferenceBase
 {
     SetDifference () {
-        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_difference (const X    *xsrc1, const X *xsrc1_end,
-                    const X    *xsrc2, const X *xsrc2_end,
-                    X          *xdst, X *xdst_end,
+    virtual UserClass*
+    set_difference (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);
@@ -147,29 +157,31 @@
     const char* const fname   = "set_difference";
     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;
 
-    X* xdst_res = alg.set_difference (xsrc1, xsrc1_end,
-                                      xsrc2, xsrc2_end, 
-                                      xdst, xdst_end, ppred);
+    UserClass* xdst_res = alg.set_difference (xsrc1, xsrc1_end,
+                                              xsrc2, xsrc2_end, 
+                                              xdst, xdst_end, ppred);
 
     // check the returned value
     bool success = xdst_res == xdst_end;
@@ -188,7 +200,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;
 
     // verify the algorithm correctness
     std::size_t i = 0;
@@ -342,16 +354,16 @@
 {
     if (0 == rw_opt_no_output_iter)
         gen_set_difference_test (
-            it1, it2, OutputIter<X>(0, 0, 0), predicate);
+            it1, it2, OutputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
         gen_set_difference_test (
-            it1, it2, FwdIter<X>(0, 0, 0), predicate);
+            it1, it2, FwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
         gen_set_difference_test (
-            it1, it2, BidirIter<X>(0, 0, 0), predicate);
+            it1, it2, BidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
         gen_set_difference_test (
-            it1, it2, RandomAccessIter<X>(0, 0, 0), predicate);
+            it1, it2, RandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 template <class InputIterator1>
@@ -360,16 +372,16 @@
 {
     if (0 == rw_opt_no_input_iter)
         gen_set_difference_test (
-            it1, InputIter<X>(0, 0, 0), predicate);
+            it1, InputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
         gen_set_difference_test (
-            it1, ConstFwdIter<X>(0, 0, 0), predicate);
+            it1, ConstFwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
         gen_set_difference_test (
-            it1, ConstBidirIter<X>(0, 0, 0), predicate);
+            it1, ConstBidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
         gen_set_difference_test (
-            it1, ConstRandomAccessIter<X>(0, 0, 0), predicate);
+            it1, ConstRandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 // generates a specialization of the set_union test for each of the required
@@ -388,23 +400,23 @@
     if (rw_opt_no_input_iter)
         rw_note (0, 0, 0, "InputIterator test disabled");
     else
-        gen_set_difference_test (InputIter<X>(0, 0, 0), predicate);
+        gen_set_difference_test (InputIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_fwd_iter)
         rw_note (0, 0, 0, "ForwardIterator test disabled");
     else
-        gen_set_difference_test (ConstFwdIter<X>(0, 0, 0), predicate);
+        gen_set_difference_test (ConstFwdIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_bidir_iter)
         rw_note (0, 0, 0, "BidirectionalIterator test disabled");
     else
-        gen_set_difference_test (ConstBidirIter<X>(0, 0, 0), predicate);
+        gen_set_difference_test (ConstBidirIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_rnd_iter)
         rw_note (0, 0, 0, "RandomAccessIterator test disabled");
     else
         gen_set_difference_test (
-            ConstRandomAccessIter<X>(0, 0, 0), predicate);
+            ConstRandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 /**************************************************************************/

Modified: incubator/stdcxx/trunk/tests/algorithms/25.set.intersection.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.set.intersection.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.set.intersection.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.set.intersection.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()
 
 /**************************************************************************/
@@ -68,7 +76,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_);
     }
@@ -88,24 +97,25 @@
     const char* iter_names [3];
 
     // pure virtual
-    virtual X*
-    set_intersection (const X*, const X*, const X*, const X*, 
-                      X*, X*, const Less*) const = 0;
+    virtual UserClass*
+    set_intersection (const UserClass*, const UserClass*, const UserClass*,
+                      const UserClass*, UserClass*, UserClass*,
+                      const Less*) const = 0;
 };
 
 template <class InputIterator1, class InputIterator2, class OutputIterator>
 struct SetIntersection: SetIntersectionBase
 {
     SetIntersection () {
-        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_intersection (const X    *xsrc1, const X *xsrc1_end,
-                      const X    *xsrc2, const X *xsrc2_end,
-                      X          *xdst, X *xdst_end,
+    virtual UserClass*
+    set_intersection (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);
@@ -147,27 +157,29 @@
     const char* const fname   = "set_intersection";
     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_intersection (xsrc1, xsrc1_end, xsrc2, 
                               xsrc2_end, xdst, xdst_end, ppred);
 
@@ -188,7 +200,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;
@@ -320,16 +332,16 @@
 {
     if (0 == rw_opt_no_output_iter)
         gen_set_intersection_test (
-            it1, it2, OutputIter<X>(0, 0, 0), predicate);
+            it1, it2, OutputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
         gen_set_intersection_test (
-            it1, it2, FwdIter<X>(0, 0, 0), predicate);
+            it1, it2, FwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
         gen_set_intersection_test (
-            it1, it2, BidirIter<X>(0, 0, 0), predicate);
+            it1, it2, BidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
         gen_set_intersection_test (
-            it1, it2, RandomAccessIter<X>(0, 0, 0), predicate);
+            it1, it2, RandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 template <class InputIterator1>
@@ -338,16 +350,16 @@
 {
     if (0 == rw_opt_no_input_iter)
         gen_set_intersection_test (
-            it1, InputIter<X>(0, 0, 0), predicate);
+            it1, InputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
         gen_set_intersection_test (
-            it1, ConstFwdIter<X>(0, 0, 0), predicate);
+            it1, ConstFwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
         gen_set_intersection_test (
-            it1, ConstBidirIter<X>(0, 0, 0), predicate);
+            it1, ConstBidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
         gen_set_intersection_test (
-            it1, ConstRandomAccessIter<X>(0, 0, 0), predicate);
+            it1, ConstRandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 // generates a specialization of the set_intersection test for each of 
@@ -367,23 +379,24 @@
     if (rw_opt_no_input_iter)
         rw_note (0, 0, 0, "InputIterator test disabled");
     else
-        gen_set_intersection_test (InputIter<X>(0, 0, 0), predicate);
+        gen_set_intersection_test (InputIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_fwd_iter)
         rw_note (0, 0, 0, "ForwardIterator test disabled");
     else
-        gen_set_intersection_test (ConstFwdIter<X>(0, 0, 0), predicate);
+        gen_set_intersection_test (ConstFwdIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_bidir_iter)
         rw_note (0, 0, 0, "BidirectionalIterator test disabled");
     else
-        gen_set_intersection_test (ConstBidirIter<X>(0, 0, 0), predicate);
+        gen_set_intersection_test (ConstBidirIter<UserClass>(0, 0, 0),
+                                   predicate);
 
     if (rw_opt_no_rnd_iter)
         rw_note (0, 0, 0, "RandomAccessIterator test disabled");
     else
         gen_set_intersection_test (
-            ConstRandomAccessIter<X>(0, 0, 0), predicate);
+            ConstRandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 /**************************************************************************/

Modified: incubator/stdcxx/trunk/tests/algorithms/25.set.sym.difference.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/algorithms/25.set.sym.difference.cpp?view=diff&rev=510071&r1=510070&r2=510071
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.set.sym.difference.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.set.sym.difference.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()
 
 /**************************************************************************/
@@ -68,7 +76,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_);
     }
@@ -88,26 +97,27 @@
     const char* iter_names [3];
 
     // ipure virtual
-    virtual X*
-    set_sym_difference (const X*, const X*, const X*, const X*, 
-                        X*, X*, const Less*) const = 0;
+    virtual UserClass*
+    set_sym_difference (const UserClass*, const UserClass*, const UserClass*,
+                        const UserClass*, UserClass*, UserClass*,
+                        const Less*) const = 0;
 };
 
 template <class InputIterator1, class InputIterator2, class OutputIterator>
 struct SetSymDifference: SetSymDifferenceBase
 {
     SetSymDifference () {
-        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 ~SetSymDifference() {}
 
-    virtual X*
-    set_sym_difference (const X    *xsrc1, const X *xsrc1_end,
-                        const X    *xsrc2, const X *xsrc2_end,
-                        X          *xdst, X *xdst_end,
+    virtual UserClass*
+    set_sym_difference (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);
@@ -151,9 +161,11 @@
     const char* const algname = "set_symmetric_difference";
     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 */);
-    X* const xdst  = new X [ndst];
+    UserClass* const xsrc1 = UserClass::from_char (src1, nsrc1,
+                                                   true /* must be sorted */);
+    UserClass* const xsrc2 = UserClass::from_char (src2, nsrc2,
+                                                   true /* must be sorted */);
+    UserClass* const xdst  = new UserClass [ndst];
 
     // source sequences must be sorted
     RW_ASSERT (0 == nsrc1 || 0 != xsrc1);
@@ -161,16 +173,16 @@
 
     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;
 
-    X* xdst_res = alg.set_sym_difference (xsrc1, xsrc1_end,
+    UserClass* xdst_res = alg.set_sym_difference (xsrc1, xsrc1_end,
                                           xsrc2, xsrc2_end, 
                                           xdst, xdst_end, ppred);
 
@@ -191,7 +203,7 @@
     }
 
     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;
 
     // verify the algorithm correctness
     std::size_t i = 0;
@@ -347,16 +359,16 @@
 {
     if (0 == rw_opt_no_output_iter)
         gen_set_sym_difference_test (
-            it1, it2, OutputIter<X>(0, 0, 0), predicate);
+            it1, it2, OutputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
         gen_set_sym_difference_test (
-            it1, it2, FwdIter<X>(0, 0, 0), predicate);
+            it1, it2, FwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
         gen_set_sym_difference_test (
-            it1, it2, BidirIter<X>(0, 0, 0), predicate);
+            it1, it2, BidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
         gen_set_sym_difference_test (
-            it1, it2, RandomAccessIter<X>(0, 0, 0), predicate);
+            it1, it2, RandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 template <class InputIterator1>
@@ -365,16 +377,16 @@
 {
     if (0 == rw_opt_no_input_iter)
         gen_set_sym_difference_test (
-            it1, InputIter<X>(0, 0, 0), predicate);
+            it1, InputIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_fwd_iter)
         gen_set_sym_difference_test (
-            it1, ConstFwdIter<X>(0, 0, 0), predicate);
+            it1, ConstFwdIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_bidir_iter)
         gen_set_sym_difference_test (
-            it1, ConstBidirIter<X>(0, 0, 0), predicate);
+            it1, ConstBidirIter<UserClass>(0, 0, 0), predicate);
     if (0 == rw_opt_no_rnd_iter)
         gen_set_sym_difference_test (
-            it1, ConstRandomAccessIter<X>(0, 0, 0), predicate);
+            it1, ConstRandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 // generates a specialization of the set_union test for each of the required
@@ -394,23 +406,25 @@
     if (rw_opt_no_input_iter)
         rw_note (0, 0, 0, "InputIterator test disabled");
     else
-        gen_set_sym_difference_test (InputIter<X>(0, 0, 0), predicate);
+        gen_set_sym_difference_test (InputIter<UserClass>(0, 0, 0), predicate);
 
     if (rw_opt_no_fwd_iter)
         rw_note (0, 0, 0, "ForwardIterator test disabled");
     else
-        gen_set_sym_difference_test (ConstFwdIter<X>(0, 0, 0), predicate);
+        gen_set_sym_difference_test (ConstFwdIter<UserClass>(0, 0, 0),
+                                     predicate);
 
     if (rw_opt_no_bidir_iter)
         rw_note (0, 0, 0, "BidirectionalIterator test disabled");
     else
-        gen_set_sym_difference_test (ConstBidirIter<X>(0, 0, 0), predicate);
+        gen_set_sym_difference_test (ConstBidirIter<UserClass>(0, 0, 0),
+                                     predicate);
 
     if (rw_opt_no_rnd_iter)
         rw_note (0, 0, 0, "RandomAccessIterator test disabled");
     else
         gen_set_sym_difference_test (
-            ConstRandomAccessIter<X>(0, 0, 0), predicate);
+            ConstRandomAccessIter<UserClass>(0, 0, 0), predicate);
 }
 
 /**************************************************************************/



Mime
View raw message