This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: V3 PATCH to std_complex.h
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 30 May 2004 11:06:56 -0500
- Subject: Re: V3 PATCH to std_complex.h
- Organization: Red Hat / Chicago
- References: <m34qpy59hd.fsf@uniton.integrable-solutions.net>
On 30 May 2004 15:29:34 +0200
Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
>I usually prefer dispatching through class templates, but in this case
>I found the overloading exceptionally simple.
Agreed, this looks great BTW.
Wow, I'd not seen this:
template<typename _Tp>
inline _Tp
norm(const complex<_Tp>& __z)
{
return _Norm_helper<__is_floating<_Tp>::_M_type && !_GLIBCXX_FAST_MATH>::_S_do_it(__z);
}
That's pretty interesting.
-benjamin