Re: class object initialisation
On Mon, 15 Sep 2003 16:51:15 +0300, "White Wolf" <wolof@freemail .hu>
wrote:
[color=blue]
>tom_usenet wrote:
>[SNIP][color=green]
>> If you choose your words carefully it makes more sense: "If we don't
>> provide an initializer for a POD, the object is initialized to an
>> indeterminate value."[/color]
>
>Initializati on == giving an initial value[/color]
Indeed, however this doesn't have to involve an initializer.
[color=blue]
>not giving an initial value (but leave garbage there) != initialization[/color]
Nope, the compiler gives an initial value to PODs if you don't bother.
This is also initialization.
[color=blue]
>[color=green]
>> "initialize " and "provide an initializer for" are best thought of as
>> different things. initialize is something the compiler (or exe) does
>> to a variable. It does it whether you provide an initializer or not.[/color]
>
>Yes. But the compiler (or the exe) does *nothing* to uninitialized PODs![/color]
Are you saying that the bytes making up the value representation of a
POD have to be changed for initialization to have occurred? I don't
think the standard backs you on this!
Tom
On Mon, 15 Sep 2003 16:51:15 +0300, "White Wolf" <wolof@freemail .hu>
wrote:
[color=blue]
>tom_usenet wrote:
>[SNIP][color=green]
>> If you choose your words carefully it makes more sense: "If we don't
>> provide an initializer for a POD, the object is initialized to an
>> indeterminate value."[/color]
>
>Initializati on == giving an initial value[/color]
Indeed, however this doesn't have to involve an initializer.
[color=blue]
>not giving an initial value (but leave garbage there) != initialization[/color]
Nope, the compiler gives an initial value to PODs if you don't bother.
This is also initialization.
[color=blue]
>[color=green]
>> "initialize " and "provide an initializer for" are best thought of as
>> different things. initialize is something the compiler (or exe) does
>> to a variable. It does it whether you provide an initializer or not.[/color]
>
>Yes. But the compiler (or the exe) does *nothing* to uninitialized PODs![/color]
Are you saying that the bytes making up the value representation of a
POD have to be changed for initialization to have occurred? I don't
think the standard backs you on this!
Tom
Comment