Re: POD function static initialization from function return, thread
by David Schwartz <davids@[EMAIL PROTECTED]
>
Oct 6, 2008 at 04:57 AM
On Oct 4, 2:50=A0pm, Brian Cole <col...@[EMAIL PROTECTED]
> wrote:
> Is this assumption safe? Where is it not? Or am I just playing with
> fire and asking to get burned?
Simply make your code conditionally compile. Define a preprocessor
value that triggers this optimization. Ensure it is defined only on
platforms where this is known to be safe. You may wish to issue a
warning if you're running on a platform where it is not know to be
safe. The warning should get someone to check the platform.
This would be a platform-specific optimization, suitable only on
platforms where it is known to be safe.
DS