Commit bc359d3a by Benjamin Kosnik Committed by Benjamin Kosnik

std_complex.h: Remove duplicate definition of conj.


2000-10-31  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* include/bits/std_complex.h: Remove duplicate definition of conj.
	* include/c/bits/std_cwctype.h: Consistent placement of undefs.

From-SVN: r37161
parent 681cb233
2000-10-31 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* include/bits/std_complex.h: Remove duplicate definition of conj.
* include/c/bits/std_cwctype.h: Consistent placement of undefs.
2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com> 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
* src/complex.cc (arg, polar): Comment out specializations. * src/complex.cc (arg, polar): Comment out specializations.
......
...@@ -177,9 +177,7 @@ namespace std ...@@ -177,9 +177,7 @@ namespace std
friend class complex<long double>; friend class complex<long double>;
// friend float abs<>(const complex<float>&); // friend float abs<>(const complex<float>&);
friend complex<float> conj<>(const complex<float>&); friend complex<float> conj<>(const complex<float>&);
friend complex<float> cos<>(const complex<float>&); friend complex<float> cos<>(const complex<float>&);
friend complex<float> cosh<>(const complex<float>&); friend complex<float> cosh<>(const complex<float>&);
friend complex<float> exp<>(const complex<float>&); friend complex<float> exp<>(const complex<float>&);
...@@ -253,7 +251,6 @@ namespace std ...@@ -253,7 +251,6 @@ namespace std
friend class complex<long double>; friend class complex<long double>;
// friend double abs<>(const complex<double>&); // friend double abs<>(const complex<double>&);
friend complex<double> conj<>(const complex<double>&); friend complex<double> conj<>(const complex<double>&);
friend complex<double> cos<>(const complex<double>&); friend complex<double> cos<>(const complex<double>&);
friend complex<double> cosh<>(const complex<double>&); friend complex<double> cosh<>(const complex<double>&);
...@@ -329,7 +326,6 @@ namespace std ...@@ -329,7 +326,6 @@ namespace std
friend class complex<double>; friend class complex<double>;
// friend long double abs<>(const complex<long double>&); // friend long double abs<>(const complex<long double>&);
friend complex<long double> conj<>(const complex<long double>&); friend complex<long double> conj<>(const complex<long double>&);
friend complex<long double> cos<>(const complex<long double>&); friend complex<long double> cos<>(const complex<long double>&);
friend complex<long double> cosh<>(const complex<long double>&); friend complex<long double> cosh<>(const complex<long double>&);
...@@ -683,12 +679,6 @@ namespace std ...@@ -683,12 +679,6 @@ namespace std
complex<_Tp>::complex(const complex<_Up>& __z) complex<_Tp>::complex(const complex<_Up>& __z)
: _M_real(__z.real()), _M_imag(__z.imag()) { } : _M_real(__z.real()), _M_imag(__z.imag()) { }
// 26.2.7/6
template<typename _Tp>
inline complex<_Tp>
conj(const complex<_Tp>& __z)
{ return complex<_Tp>(__z.real(), -__z.imag()); }
// 26.2.7/4 // 26.2.7/4
template<typename _Tp> template<typename _Tp>
inline _Tp inline _Tp
...@@ -949,6 +939,7 @@ namespace std ...@@ -949,6 +939,7 @@ namespace std
polar(const _Tp& __rho, const _Tp& __theta) polar(const _Tp& __rho, const _Tp& __theta)
{ return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
// 26.2.7/6
template<typename _Tp> template<typename _Tp>
inline complex<_Tp> inline complex<_Tp>
conj(const complex<_Tp>& __z) conj(const complex<_Tp>& __z)
......
...@@ -39,12 +39,7 @@ ...@@ -39,12 +39,7 @@
#pragma GCC system_header #pragma GCC system_header
#include_next <wctype.h> #include_next <wctype.h>
namespace std // Get rid of those macros defined in <wctype.h> in lieu of real functions.
{
using ::wctype_t;
using ::wctrans_t;
// Get rid of those macros defined in <wctype.h> in lieu of real functions.
#undef iswalnum #undef iswalnum
#undef iswalpha #undef iswalpha
#undef iswblank #undef iswblank
...@@ -60,6 +55,11 @@ namespace std ...@@ -60,6 +55,11 @@ namespace std
#undef iswxdigit #undef iswxdigit
#undef iswctype #undef iswctype
namespace std
{
using ::wctype_t;
using ::wctrans_t;
extern "C" int iswalnum(wint_t); extern "C" int iswalnum(wint_t);
extern "C" int iswalpha(wint_t); extern "C" int iswalpha(wint_t);
extern "C" int iswblank(wint_t); extern "C" int iswblank(wint_t);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment