stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elemi...@apache.org
Subject svn commit: r662491 - in /stdcxx/branches/4.2.x/tests: algorithms/25.fill.cpp algorithms/25.generate.cpp include/alg_test.h src/23.containers.cpp
Date Mon, 02 Jun 2008 17:30:19 GMT
Author: elemings
Date: Mon Jun  2 10:30:19 2008
New Revision: 662491

URL: http://svn.apache.org/viewvc?rev=662491&view=rev
Log:
2008-06-02  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-550
	* tests/include/alg_test.h (Size): Add `IntegralType' typedef
	for casting values to same type used by template parameter.
	* tests/algorithms/25.fill.cpp (test_fill_n): Use `IntegralType'
	to cast integer value to exact integer type of Size constructor.
	* tests/algorithms/25.generate.cpp (test_generate_n): Likewise.
	* tests/src/23.containers.cpp (_rw_sigcat, _rw_argno): Cast
	entire expression to `int' type rather than just `which' enum.


Modified:
    stdcxx/branches/4.2.x/tests/algorithms/25.fill.cpp
    stdcxx/branches/4.2.x/tests/algorithms/25.generate.cpp
    stdcxx/branches/4.2.x/tests/include/alg_test.h
    stdcxx/branches/4.2.x/tests/src/23.containers.cpp

Modified: stdcxx/branches/4.2.x/tests/algorithms/25.fill.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/algorithms/25.fill.cpp?rev=662491&r1=662490&r2=662491&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/algorithms/25.fill.cpp (original)
+++ stdcxx/branches/4.2.x/tests/algorithms/25.fill.cpp Mon Jun  2 10:30:19 2008
@@ -146,7 +146,7 @@
         const OutputIterator begin =
             make_iter (buf, buf, buf_end, dummy_iter);
 
-        const Size n (int (i), 0 /* dummy */);
+        const Size n (typename Size::IntegralType (i), 0 /* dummy */);
         const T    value;
 
         // the number of invocations of the assignment operator

Modified: stdcxx/branches/4.2.x/tests/algorithms/25.generate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/algorithms/25.generate.cpp?rev=662491&r1=662490&r2=662491&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/algorithms/25.generate.cpp (original)
+++ stdcxx/branches/4.2.x/tests/algorithms/25.generate.cpp Mon Jun  2 10:30:19 2008
@@ -186,7 +186,7 @@
         const ForwardIterator begin =
             make_iter (buf, buf, buf_end, gen_iter);
 
-        const Size n (int (i), 0);
+        const Size n (typename Size::IntegralType (i), 0);
         const Generator<T> gen (0, 0);
 
         // store the value of the next element

Modified: stdcxx/branches/4.2.x/tests/include/alg_test.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/include/alg_test.h?rev=662491&r1=662490&r2=662491&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/include/alg_test.h (original)
+++ stdcxx/branches/4.2.x/tests/include/alg_test.h Mon Jun  2 10:30:19 2008
@@ -342,6 +342,8 @@
 template <class IntegralT>
 struct Size
 {
+    typedef IntegralT IntegralType;
+
     // dummy argument provided to prevent Size from being constructible
     // by conversion from IntegralT
     Size (IntegralT val, int /* dummy */ )

Modified: stdcxx/branches/4.2.x/tests/src/23.containers.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/src/23.containers.cpp?rev=662491&r1=662490&r2=662491&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/src/23.containers.cpp (original)
+++ stdcxx/branches/4.2.x/tests/src/23.containers.cpp Mon Jun  2 10:30:19 2008
@@ -174,7 +174,7 @@
     const bool is_member = 0 != (Ids::bit_member & which);
 
     // get the bitmap describing the function's argument types
-    int argmap = (int (which) & ~Ids::bit_member) >> Ids::fid_bits;
+    int argmap = int ((which & ~Ids::bit_member) >> Ids::fid_bits);
 
     // determine whether the function is a const member function
     bool is_const_member =
@@ -327,8 +327,8 @@
 _rw_argno (size_t which, int arg)
 {
     // get the bitmap describing the function's argument types
-    int argmap = (int (which) & ~ContainerIds::bit_member)
-                 >> ContainerIds::fid_bits;
+    int argmap = int ((which & ~ContainerIds::bit_member)
+                      >> ContainerIds::fid_bits);
 
     int argno = 0;
 



Mime
View raw message