Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2005-09-07 11:31:31

Alexander Terekhov <terekhov_at_[hidden]> writes:

> Anthony Williams wrote:
> [...]
>> Despite tendering a version that handles non-void returns, I am not sure how
>> to do it right (destruction order for statics makes it hard), so I have left
>> that out for now.
> Why not simply make once_flag POD and provide call_once_reset()? Plus
> convenient (derived) non-POD class for dynamic context?

That's easy: because I didn't think of it.

I can understand what you're getting at with the derived class for dynamic
contexts, such as class members, but how are you envisioning the
call_once_reset function working? Would it take a specific once_flag as a
parameter, and reset it, as if it has never been called? When would this be
used, and how would it help with static destruction?


Anthony Williams
Software Developer

Boost list run by bdawes at, gregod at, cpdaniel at, john at