
8 Sep
2005
8 Sep
'05
10:20 a.m.
John Maddock wrote: [...]
Me neither, and I still don't see what having a return value really gains us in this case (I would much rather be able to pass parameters to the call_once procedure, but that's a whole other ball game).
Both are useful.
If a return value is truly required, then we could use aligned_storage to provide raw storage for the return value and construct the object on first call to the one procedure, but that still doesn't solve the destruction problem.
That's not your problem as long as you don't destruct and instead provide _reset/destroy/init() calls. regards, alexander.