]> www.ginac.de Git - cln.git/commit
Replace CL_REQUIRE/CL_PROVIDE(cl_random_def) with portable code.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Thu, 21 Aug 2008 11:11:08 +0000 (15:11 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 27 Aug 2008 04:41:03 +0000 (08:41 +0400)
commit6e18082d677e9e027a0b3e78a0933146e09a7d07
treee34a7278b602e0942d55853d174032c65f257763
parent040ed6f6ed478f65442b2e0fee05c19b42c0d5e9
Replace CL_REQUIRE/CL_PROVIDE(cl_random_def) with portable code.

The order of initialization of non-local objects in different compilation units
is not specified in C++. Hence special care should be taken to avoid static
initialization order fiasco. CLN solved the problem with some evil (GCC
specific, and even GCC-version-specific) hack. Replace it with a technique
similar to one used in STL to initialize std::cout and friends.
include/cln/random.h
src/base/random/cl_random_def.cc