Greetings
> I don't think a local static will work because it will get created before
> main() if I recall the correct semantics of C++.
Section 7.1.2 Stroustrup The C++ Programming Language
If a local variable is declared static, a single, statically allocated
> object will be used to represent that variable in all calls of the function.
> It will be initialized only the first time the *thread of execution
> reaches its definition*.
In our case (as suggested by Phillipp) that would happen only when the first
call to sc_max_time() is made.
Regards
- Puneet
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Sep 13 20:54:19 2010
This archive was generated by hypermail 2.1.8 : Mon Sep 13 2010 - 20:54:22 PDT