schwartz counters?

Discussion in 'C++' started by John Harrison, Jun 26, 2004.

  1. 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.
    John Harrison, Jun 26, 2004
    #1
    1. Advertising

  2. John Harrison

    John Carson Guest

    "John Harrison" <> wrote in message
    news:
    > 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.


    --
    John Carson
    1. To reply to email address, remove donald
    2. Don't reply to email address (post here instead)
    John Carson, Jun 27, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eli Bendersky
    Replies:
    7
    Views:
    586
    Nicolas Matringe
    Oct 27, 2004
  2. Dave Townsend

    Schwartz counters.

    Dave Townsend, Jun 26, 2004, in forum: C++
    Replies:
    2
    Views:
    361
    Alf P. Steinbach
    Jun 27, 2004
  3. Ramon F Herrera
    Replies:
    0
    Views:
    269
    Ramon F Herrera
    May 8, 2008
  4. hudson

    and Randal L. Schwartz the hacker

    hudson, Aug 20, 2003, in forum: Perl Misc
    Replies:
    10
    Views:
    146
    Matt Garrish
    Aug 22, 2003
  5. weston
    Replies:
    5
    Views:
    108
    Dr.Ruud
    Mar 4, 2006
Loading...

Share This Page