schwartz counters?

J

John Harrison

In a review of C++ Gotchas by Stephen Dewhurst I read the following

"however C++ Gotchas does contain some information that I've not seen
elsewhere - the use of translation-unit-local static "Schwarz counters" to
control the order of non-local static initialization, for example"

Can anyone explain this technique to me or am I going to have to read the
book?

john

PS a google search turned up a few references but nothing that actually
explained the technique.
 
J

John Carson

John Harrison said:
In a review of C++ Gotchas by Stephen Dewhurst I read the following

"however C++ Gotchas does contain some information that I've not seen
elsewhere - the use of translation-unit-local static "Schwarz
counters" to control the order of non-local static initialization,
for example"

Can anyone explain this technique to me or am I going to have to read
the book?

john

PS a google search turned up a few references but nothing that
actually explained the technique.


http://www-d0.fnal.gov/KAI/doc/tutorials/static_initialization.html

In addition, Bruce Eckel discusses it and other techniques in volume I of
his Thinking in C++, chapter 10.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top