🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #266

Re: Scope of static member initializers

#266
From: Purple dragons! EVERYWHERE!!!
Date: Fri, 03 Aug 1990 16:10
20 lines
1333 bytes
In article <> lippin@math.berkeley.edu writes:
>const bounded bounded::max=maxp;    { maxp was a member of bounded }
>
>My CFront declares the last line invalid, saying that maxp is not
>defined.  But now the problem is not so clear-cut to me; perhaps this
>implementation is wrong?

Maybe I just haven't worked with this, but it seems to me that the
scope declarations on one side of an assignment wouldn't apply to the
other, at least not by default.  Thus, since you didn't specify that
maxp was a member of bounded, it looked in the local scope.  Did you try:
const bounded bounded::max=bounded::maxp   ?

If this isn't the way things work, it should be, in my opinion...

And if this is what you said in your message, forget this, but I don't
think it is.

==GROWF!
Technical Details
Message-ID: <5704@darkstar.ucsc.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!apple!agate!darkstar!ucscb.UCSC.EDU!growf
References: <1990Aug1.030632.2273@agate.berkeley.edu> <10603@batcomputer.tn.cornell.edu> <1990Aug2.214222.14165@agate.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!apple!agate!darkstar!ucscb.UCSC.EDU!growf
From: growf@ucscb.UCSC.EDU (Purple dragons!  EVERYWHERE!!!)
Newsgroups: comp.std.c++
Subject: Re: Scope of static member initializers
Message-ID: <5704@darkstar.ucsc.edu>
Date: 3 Aug 90 16:10:13 GMT
References: <1990Aug1.030632.2273@agate.berkeley.edu> <10603@batcomputer.tn.cornell.edu> <1990Aug2.214222.14165@agate.berkeley.edu>
Sender: usenet@darkstar.ucsc.edu
Organization: University of California, Santa Cruz; Open Access Computing
Lines: 20