Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-09-02 06:18:10


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk