
2 Sep
2005
2 Sep
'05
11:18 a.m.
Alexander Terekhov wrote:
Peter Dimov wrote: [...]
I like the signature of call_once:
template<typename Function> void call_once(Function f, once_flag& flag)
Only as long as you stick to void Functions. Or am I just missing something?
Well, it's better than void(*)() and has enough expressive power to emulate the rest. The "typename result_of<Function()>::type" version is slightly harder to specify and implement. Probably not much, though.