C++ support for decimal floating point
Gabriel Dos Reis
dosreis@gmail.com
Thu Sep 24 03:19:00 GMT 2009
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
>
More information about the Libstdc++
mailing list