Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2001-08-01 09:19:25

> First, should there even be once
> methods? Many think that they are a legacy hack for C short comings
> and that a proper design should never need them. However, in C++
> there's often a need for "globals" that are complex objects requiring
> construction and with out once methods it's going to be difficult to
> code such things, so I'm not sure the argument is valid (or to put it
> better, it is valid, but the reasons why it must exist in C remain
> for C++ and not all designs can be modified to eliminate this need).

yeah.. the problem of (need for) thread-safe lazy-initialization
(which works perfectly with static locals in single threaded
C/C++ programs) has nothing to do with C vs C++ coding style


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