Boost logo

Boost Users :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2007-06-01 00:00:58


> "Kolya Kosenko" <wxkolya_at_[hidden]> wrote in message
> news:4659BEE9.9040907_at_gmail.com...
> This bug exists at msvc-6.0 and msvc-7.1 when precompiled headers is used.
> It is *not* exits at msvc-8.0
> at all. I have no msvc-7.0 so I suppose it behavior is similar to
> msvc-7.1.
>
> Also I have following linker error at msvc-6.0 when I have solved previous
> problem:
> filemain.obj : error LNK2005: "bool boost::test_tools::`anonymous
> namespace'::dummy_cond" (?dummy_cond@?
> %..\..\boost/test/unit_test_log.hpp1238016409_at_test_tools_at_boost@@3_NA)
> already defined in pch.obj
>
> This patches should fix both problems:
> ==========
> --- boost/boost/test/utils/trivial_singleton.hpp 2006-01-01
> 19:29:38.000000000 +0200
> +++ boost/boost/test/utils/trivial_singleton.hpp.patched 2007-05-27
> 20:00:15.031250000 +0300
> @@ -55,6 +55,10 @@
> #define BOOST_TEST_SINGLETON_INST( inst ) \
> static BOOST_JOIN( inst, _t)& inst = BOOST_JOIN (inst, _t)::instance();
>
> +#elif BOOST_WORKAROUND(BOOST_MSVC, < 1400)
> +#define BOOST_TEST_SINGLETON_INST( inst ) \
> +namespace { static BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst,
> _t)::instance(); }

Do we really need anonymous namespace for this case?

> +
> #else
>
> #define BOOST_TEST_SINGLETON_INST( inst ) \
> ==========
> --- boost/boost/test/test_tools.hpp.orig.bak 2007-02-22
> 19:57:30.000000000 +0200
> +++ boost/boost/test/test_tools.hpp 2007-05-27 18:53:26.718750000
> +0300
> @@ -259,8 +259,16 @@
>
> typedef unit_test::const_string const_string;
>
> +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)

I do not plan to include msvc 6.0 targeted patches, unless boost regression
testing is affected.

> I think it would be nice to include tests for precompiled headers in
> regression tests of Boost.Test library.

Every compiler means something different by this term. You can't write
portable code with precompiled headers.

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net