🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: static members as members of a metaclass h

#3964
From: Jeffrey C. Gealow
Date: Tue, 09 Apr 1996 04:27
19 lines
1550 bytes
In article <4jckdc$ad6@engnews1.Eng.Sun.COM> clamage@Eng.Sun.COM 
(Steve Clamage) writes:

   I believe a reasonable solution to the problem of initialization of 
   non-local static data is not to use non-local static data!

   Instead of a static data object or static class data member, use a 
   function with a local static object.

But this adds the overhead of the function call mechanism to every use 
of the object.

Jeff
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <kywx3q1nox.fsf@gator.mit.edu>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
References: <4jc5lt$doh@arl-news-svc-2.compuserve.com> <4jckdc$ad6@engnews1.Eng.Sun.COM>

Show Full Headers
Complete Article Headers
From: jgealow@mtl.mit.edu (Jeffrey C. Gealow)
Message-ID: <kywx3q1nox.fsf@gator.mit.edu>
X-Original-Date: 08 Apr 1996 16:10:54 -0400
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 09 Apr 96 04:27:35 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
Subject: Re: static members as members of a metaclass h
Organization: MIT Microsystems Technology Laboratories
References: <4jc5lt$doh@arl-news-svc-2.compuserve.com>
 <4jckdc$ad6@engnews1.Eng.Sun.COM>
In-Reply-To: clamage@Eng.Sun.COM's message of 28 Mar 96 09:26:03 GMT
X-Newsreader: Gnus v5.1
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMWnnP+EDnX0m9pzZAQG4GAF7Bgy3QUanZqfTOkrg5AKY9vEk510oJro8
 TI5Xnjj50FBeK9eHOkQWpkzjmownUsl+
 =7rPQ