Author: sebor
Date: Fri Jan 19 08:26:30 2007
New Revision: 497863
URL: http://svn.apache.org/viewvc?view=rev&rev=497863
Log:
2007-01-19 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-322
* complex (operator=): Used the public member functions real()
and imag() instead of the private data members.
Modified:
incubator/stdcxx/trunk/include/complex
Modified: incubator/stdcxx/trunk/include/complex
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/complex?view=diff&rev=497863&r1=497862&r2=497863
==============================================================================
--- incubator/stdcxx/trunk/include/complex (original)
+++ incubator/stdcxx/trunk/include/complex Fri Jan 19 08:26:30 2007
@@ -7,16 +7,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 2000-2006 Rogue Wave Software.
*
**************************************************************************/
@@ -146,8 +153,8 @@
#ifndef _RWSTD_NO_MEMBER_TEMPLATE
template <class _TypeT>
- complex<value_type>& operator= (const complex<_TypeT>& __rhs) {
- return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this;
+ complex& operator= (const complex<_TypeT>& __rhs) {
+ return (_C_re = __rhs.real ()), (_C_im = __rhs.imag ()), *this;
}
#endif // _RWSTD_NO_MEMBER_TEMPLATE
@@ -234,8 +241,8 @@
#ifndef _RWSTD_NO_MEMBER_TEMPLATE
template <class _TypeT>
- complex<value_type>& operator= (const complex<_TypeT>& __rhs) {
- return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this;
+ complex& operator= (const complex<_TypeT>& __rhs) {
+ return (_C_re = __rhs.real ()), (_C_im = __rhs.imag ()), *this;
}
#endif // _RWSTD_NO_MEMBER_TEMPLATE
@@ -338,7 +345,7 @@
template <class _TypeT>
complex& operator= (const complex<_TypeT>& __rhs) {
- return (_C_re = __rhs._C_re), (_C_im = __rhs._C_im), *this;
+ return (_C_re = __rhs.real ()), (_C_im = __rhs.imag ()), *this;
}
#endif // _RWSTD_NO_MEMBER_TEMPLATE