]> www.ginac.de Git - cln.git/commit
Replace CL_REQUIRE/CL_PROVIDE(cl_no_ring) with portable code.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Thu, 21 Aug 2008 11:15:09 +0000 (15:15 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 27 Aug 2008 04:41:03 +0000 (08:41 +0400)
commiteb8b5fefdbd3c400869ad4ab0e88acb74c4f60ea
tree6279a6f90eec11e0d8114ca816269f47229b9ad3
parent6e18082d677e9e027a0b3e78a0933146e09a7d07
Replace CL_REQUIRE/CL_PROVIDE(cl_no_ring) 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/ring.h
src/base/ring/cl_no_ring.cc