!BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) ) causing problems on MSVC compiler
I am using boost for the first time and not much aware of whets going on. I am including serialization archive hpps and it is including these lines eventually somewhere inside namespace detail{ #if !BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) ) using namespace boost::detail; #endif I am using Visual Studio and MSVC compiler and this using directive is causing me problems. There is a CRITICAL_SECTION defined in boos::detail which conflicts with standard windows CRITICAL_SECTION. The thing am not able to understand is how is this Workaround works ? If this workaround checks for BORLANDC then shouldn't it just place that code for Borland compiler? Please help. Is there any other macro I can define or undefine that will get rid of this. Thanks Shanti
AMDG Terdale, Shantibhushan wrote:
I am using boost for the first time and not much aware of whets going on. I am including serialization archive hpps and it is including these lines eventually somewhere inside
namespace detail{
#if !BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) )
using namespace boost::detail;
#endif
I am using Visual Studio and MSVC compiler and this using directive is causing me problems. There is a CRITICAL_SECTION defined in boos::detail which conflicts with standard windows CRITICAL_SECTION.
The thing am not able to understand is how is this Workaround works ? If this workaround checks for BORLANDC then shouldn't it just place that code for Borland compiler?
Did you notice the ! The using directive will appear for all compilers except borland.
Please help. Is there any other macro I can define or undefine that will get rid of this.
Grrr... I think this is a compiler bug. Do you have a small test case? Which version of msvc are you using? What file is this in? In Christ, Steven Watanabe
. template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & degrees; ar & minutes; ar & seconds; } int degrees; int minutes; float seconds;
I am using MSVC 8.0 and here is example. This is the complete code and
find the error at the end. If namespaces are used to avoid ambiguity I
started wondering why are we doing using namespace boost::detail
#include
I am using boost for the first time and not much aware of whets going on. I am including serialization archive hpps and it is including these lines eventually somewhere inside
namespace detail{
#if !BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) )
using namespace boost::detail;
#endif
I am using Visual Studio and MSVC compiler and this using directive is
causing me problems. There is a CRITICAL_SECTION defined in boos::detail which conflicts with standard windows CRITICAL_SECTION.
The thing am not able to understand is how is this Workaround works ? If this workaround checks for BORLANDC then shouldn't it just place that code for Borland compiler?
Did you notice the ! The using directive will appear for all compilers except borland.
Please help. Is there any other macro I can define or undefine that will get rid of this.
Grrr... I think this is a compiler bug. Do you have a small test case? Which version of msvc are you using? What file is this in? In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
AMDG Terdale, Shantibhushan wrote:
I am using MSVC 8.0 and here is example. This is the complete code and find the error at the end. If namespaces are used to avoid ambiguity I started wondering why are we doing using namespace boost::detail
This seems to have been fixed. It fails with 1.35 but compiles with the 1.36 beta. In Christ, Steven Watanabe
Steven Watanabe:
Terdale, Shantibhushan wrote:
I am using MSVC 8.0 and here is example. This is the complete code and find the error at the end. If namespaces are used to avoid ambiguity I started wondering why are we doing using namespace boost::detail
This seems to have been fixed. It fails with 1.35 but compiles with the 1.36 beta.
IIRC, the particular problem with CRITICAL_SECTION has been fixed, but the general problem with the MSVC bug making everything boost:: and boost::detail:: visible in the global namespace has not been. The header needs to be updated to not rely on an using directive (on non-Borland compilers as well).
participants (3)
-
Peter Dimov
-
Steven Watanabe
-
Terdale, Shantibhushan