
6 Oct
2006
6 Oct
'06
2:22 p.m.
Anthony Williams wrote:
Sorry, I didn't make it clear. It is the automatic storage duration restriction which is not present on Windows.
I see. But what is your intent? Are you trying to come up with a single mutex, that is both statically (lazy) intializeable (i.e. of type POD) _and_ at the same time default constructible? This simply is not feasible. If your intent is to work around the pthread_once this is as I see it, much easier. Just use a static mutex and condition to emulate call_once. Aren't the ability to statically initialize a mutex, and availability of call_once just two sides of the same medal? Roland