Boost logo

Boost :

From: Gabriel Dos Reis (Gabriel.Dos-Reis_at_[hidden])
Date: 2001-04-20 08:40:23


Matt Austern <austern_at_[hidden]> writes:

| There might be, depending on what kind of initialization we're
| talking about. But since this is inherently platform specific
| anyway, you can always use platform-specific initialization
| tricks if you have to.
|
| And in some cases you might not have to use any such tricks.
| I'm thinking of something like this:
|
| union fp_constant {
| unsigned int n;
| float f;
| };
|
| fp_constant internal_pi = { 0x40490fdb };
| float pi = internal_pi.f;

Matt, doesn't that belong to undefined behaviour-land?

-- Gaby


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