
2 Sep
2005
2 Sep
'05
10:57 p.m.
Alexander Terekhov wrote:
Peter Dimov wrote:
On second thought, a non-void return doesn't make sense; what could it return when call_once is called a second time?
The same thing as the first time.
Things like auto_ptr aside, you'd need to templatize the once_flag on the return type then, since the first time value needs to be stored somewhere. Is this worth the hassle?