This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: C++ support for decimal floating point
On Wed, Sep 23, 2009 at 9:19 PM, Benjamin Kosnik <bkoz@redhat.com> wrote:
>
> ?template<>
> ? ?struct complex<double>
> ? ?{
> ? ? ?typedef double value_type;
> ? ? ?typedef __complex__ double _ComplexT;
>
> ? ? ?complex(_ComplexT __z) : _M_value(__z) { }
>
> ? ? ?complex(double __r = 0.0, double __i = 0.0)
> ? ? ?{
> ? ? ? ?__real__ _M_value = __r;
> ? ? ? ?__imag__ _M_value = __i;
> ? ? ?}
>
> ? ? ?complex(const complex<float>& __z)
> ? ? ?: _M_value(__z.__rep()) { }
>
> ? ? ?explicit complex(const complex<long double>&);
>
> ?...
>
> ? ?private:
> ? ? ?_ComplexT _M_value;
> ? ?};
>
> There are existing problems with these ctor overloads in the presence of
> initialization lists I believe.
Hmm, is there a PR I should look at?
>
> -benjamin
>