On Sat, 27 Oct 2001, Nathan Myers wrote:
[...]
> > I'd say that the best solution would be to get rid of globals. This is
> > actually very easy:
> >
> > If you have
> > TYPE VAR = INITIALIZER;
> > replace that with
> > TYPE& getVAR(){ static TYPE obj = INITIALIZER; return obj; }
> >
> > T
On Wed, Oct 24, 2001 at 11:48:02PM +0200, Martin v. Loewis wrote:
> > Lots of real C++ code is order-sensitive. This is a serious problem and
> > there are a couple of ugly solutions to it.
>
> I'd say that the best solution would be to get rid of globals. This is
> actually very easy:
>
> If
Hi,
On Thu, 25 Oct 2001, Martin v. Loewis wrote:
> > I don't like this `construct on first use' idiom at all, aesthetically.
>
> Isn't this exactly what you want, and what modules.h does? If module A
> uses module B, construction of A first constructs B.
Sure it is.
> > I find it disgusting t
> I don't like this `construct on first use' idiom at all, aesthetically.
Isn't this exactly what you want, and what modules.h does? If module A
uses module B, construction of A first constructs B.
> I find it disgusting to use a function call for that and a
> preprocessor symbol.
Well, you do
On Wed, 24 Oct 2001, Martin v. Loewis wrote:
> I'd say that the best solution would be to get rid of globals. This is
> actually very easy:
>
> If you have
>
> TYPE VAR = INITIALIZER;
>
> replace that with
>
> TYPE& getVAR(){
> static TYPE obj = INITIALIZER;
> return obj;
> }
>
> Then use
> Lots of real C++ code is order-sensitive. This is a serious problem and
> there are a couple of ugly solutions to it.
I'd say that the best solution would be to get rid of globals. This is
actually very easy:
If you have
TYPE VAR = INITIALIZER;
replace that with
TYPE& getVAR(){
static T
> > You get the code you want with -fno-use-cxa-atexit. Should we revert
> > this change?
>
> I don't think so. I'm 90% positive that this is CLN's fault.
> Inserting labels in the body of a function is a somewhat disgusting way
> to do it!
I agree. There is no guarantee in the C++ language, or
7 matches
Mail list logo