Boost logo

Boost :

Subject: Re: [boost] [complex] Feedback and Potential Review Manager
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-05-07 21:29:10


AMDG

On 05/07/2012 01:35 PM, Christopher Kormanyos wrote:
>
> I also believe that the value of, say, the default
> constructor of float is zero. In particular
>
> void do_something()
> {
> // F1 is initialized to zero.
> float f1 = float();
> ...
> }
>

This is /not/ the default constructor.
f1 is copy constructed from an /value-initialized/
temporary. For scalar types, value initialization
is the same as zero initialization.

> So ISO/IEC 14882:2011 ensures that all valid uses
> of complex are default initialized to zero. Without
> judgement, this is the spec.
>

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk