stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r494513 - /incubator/stdcxx/trunk/include/valarray
Date Tue, 09 Jan 2007 18:34:32 GMT
Author: sebor
Date: Tue Jan  9 10:34:32 2007
New Revision: 494513

URL: http://svn.apache.org/viewvc?view=rev&rev=494513
Log:
2007-01-09  Martin Sebor  <sebor@roguewave.com>

	* valarray (abs, acos, asin, atan, atan2, cos, cosh, exp, log,
	log10, pow, sin, sinh, sqrt, tan, tanh): Replaced T() with T(0)
	in order to work around a gcc 3.2.3 bug (see STDCXX-317).

Modified:
    incubator/stdcxx/trunk/include/valarray

Modified: incubator/stdcxx/trunk/include/valarray
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/valarray?view=diff&rev=494513&r1=494512&r2=494513
==============================================================================
--- incubator/stdcxx/trunk/include/valarray (original)
+++ incubator/stdcxx/trunk/include/valarray Tue Jan  9 10:34:32 2007
@@ -1027,7 +1027,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> abs (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = __val [__i] < _TypeT () ? -__val [__i] : __val [__i];
@@ -1038,7 +1038,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> acos (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::acos (__val [__i]);
@@ -1049,7 +1049,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> asin (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::asin (__val [__i]);
@@ -1061,7 +1061,7 @@
 template<class _TypeT>
 valarray<_TypeT> atan (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::atan (__val [__i]);
@@ -1072,7 +1072,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> cos (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::cos (__val [__i]);
@@ -1083,7 +1083,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> cosh (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::cosh (__val [__i]);
@@ -1094,7 +1094,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> exp (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::exp (__val [__i]);
@@ -1105,7 +1105,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> log (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::log (__val [__i]);
@@ -1116,7 +1116,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> log10 (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::log10 (__val [__i]);
@@ -1127,7 +1127,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> sinh (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::sinh (__val [__i]);
@@ -1138,7 +1138,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> sin (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::sin (__val [__i]);
@@ -1149,7 +1149,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> sqrt (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::sqrt (__val [__i]);
@@ -1160,7 +1160,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> tan (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::tan (__val [__i]);
@@ -1171,7 +1171,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> tanh (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::tanh (__val [__i]);
@@ -1185,7 +1185,7 @@
 {
     _RWSTD_ASSERT (__x.size () == __y.size ());
 
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __x.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __x.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::atan2 (__x [__i], __y [__i]);
@@ -1221,7 +1221,7 @@
 {
     _RWSTD_ASSERT (__x.size () == __y.size ());
 
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __x.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __x.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::pow (__x [__i], __y [__i]);
@@ -1232,7 +1232,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> pow (const valarray<_TypeT> &__x, const _TypeT &__y)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __x.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __x.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::pow (__x [__i], __y);
@@ -1243,7 +1243,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> pow (const _TypeT &__x, const valarray<_TypeT> &__y)
 {
-    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __y.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __y.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::pow (__x, __y [__i]);



Mime
View raw message