Boost logo

Boost Users :

From: Kolya Kosenko (wxkolya_at_[hidden])
Date: 2007-06-01 14:21:56


Gennadiy Rozental wrote:
>> --- 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?
>
No, anonymous namespace is not required in this case.

> Every compiler means something different by this term. You can't write
> portable code with precompiled headers.
If you write a portable code, you can use macro |BOOST_BUILD_PCH_ENABLED
for divide compilers that supports precompiled headers from compilers than does not support it.

|It is need to support only for precompiled headers which is supported by boost build system - msvc and gcc only.

Boost.Build officially supports precompiled headers:

http://www.boost.org/doc/html/bbv2/tasks.html#bbv2.reference.precompiled_headers

Thank you.
Kolya Kosenko


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