Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-11-10 12:41:40


Nigel Rantor wrote:

> My understanding of uninitialised variables is that their *values*
> were undefined, that you could not rely on them to be any particular
> value, including not being within range for that type.

No, this is only true for "unsigned char". Accessing the value of an
uninitialized object of any other type is undefined behavior, which means
that you can - and in some cases will - get a hardware trap.

> So, you can read them, ...

Not in portable code, although true in practice for most of today's
hardware.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net