Quantcast
Channel: C++ Static Initialization via Schwartz Counter - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Dietmar Kühl for C++ Static Initialization via Schwartz Counter

The use of "Schwartz counters" (so called after Jerry Schwartz who designed the basics of the IOStreams library as it is now in the standard; note that he can't be blamed for many of odd choices...

View Article



C++ Static Initialization via Schwartz Counter

A Schwartz counter is intended to ensure that a global object is initialized before it is used.Please consider the use of a Schwartz counter shown below.File Foo.h:class Foo{ Foo::Foo();};File...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images