[test] Patch for Tru64/CXX

Hello, attached patch solves a problem with the singleton implementation in the test library surfacing on Tru64/CXX. On this compiler, we need an explicit instantiation of the singleton template, otherwise multiple copies of the singleton are created. Ok to apply? Markus Index: utils/trivial_singleton.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/test/utils/trivial_singleton.hpp,v retrieving revision 1.1 diff -u -r1.1 trivial_singleton.hpp --- utils/trivial_singleton.hpp 20 Feb 2005 08:27:08 -0000 1.1 +++ utils/trivial_singleton.hpp 14 Jun 2005 07:26:59 -0000 @@ -45,9 +45,19 @@ type() {} \ /**/ +#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) + +#define BOOST_TEST_SINGLETON_INST( inst ) \ +template class unit_test::singleton< BOOST_JOIN( inst, _t ) > ; \ +namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); } + +#else + #define BOOST_TEST_SINGLETON_INST( inst ) \ namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); } +#endif + } // namespace boost //____________________________________________________________________________//

"Markus Schöpflin" <markus.schoepflin@comsoft.de> wrote in message news:d8m0nk$mlh$1@sea.gmane.org...
Hello,
attached patch solves a problem with the singleton implementation in the test library surfacing on Tru64/CXX. On this compiler, we need an explicit instantiation of the singleton template, otherwise multiple copies of the singleton are created.
Ok to apply?
Go ahead. Thanks, Gennadiy

Gennadiy Rozental wrote:
"Markus Schöpflin" <markus.schoepflin@comsoft.de> wrote in message news:d8m0nk$mlh$1@sea.gmane.org...
attached patch solves a problem with the singleton implementation in the test library surfacing on Tru64/CXX. On this compiler, we need an explicit instantiation of the singleton template, otherwise multiple copies of the singleton are created.
Ok to apply?
Go ahead.
Done, thanks. Markus
participants (2)
-
Gennadiy Rozental
-
Markus Schöpflin