Problems with boost 1.36 and serialization library with VS2005 SP1

Hello, at the moment I wont to switch from boost 1.34.1 to 1.36. But now I have a compile error witch depends from the serialization error. I have a managed application and for that there is also a definition array in the cli namespace. The new version of boost seems to define somewhere the namespace boost globally and so it is not anymore possilbe to compile the application. I have searched where this problem exists but I don't have found the header... I have found only that the problem exists when this 2 headeres are included #include <boost/serialization/detail/shared_ptr_132.hpp> #include <boost/archive/basic_binary_iprimitive.hpp> Has anyone an idea how I can solve the problem? Best regards Hansjörg

This problem is caused by a MSVC bug triggered by the using namespace boost; directive in boost/serialization/detail/shared_ptr_132.hpp:45. You should be able to fix that by deleting the lines #if !BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x560) ) using namespace boost; #endif and changing #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) ) template<class Y> explicit shared_ptr(Y * p): px(p), pn(p,boost::checked_deleter<Y>()) // Y must be complete #else template<class Y> explicit shared_ptr(Y * p): px(p), pn(p, checked_deleter<Y>()) // Y must be complete #endif to just template<class Y> explicit shared_ptr(Y * p): px(p), pn(p,boost::checked_deleter<Y>()) // Y must be complete ----- Original Message ----- From: "Hansi" <hansipet@web.de> To: <boost@lists.boost.org> Sent: Monday, August 25, 2008 11:12 Subject: [boost] Problems with boost 1.36 and serialization library withVS2005 SP1 Hello, at the moment I wont to switch from boost 1.34.1 to 1.36. But now I have a compile error witch depends from the serialization error. I have a managed application and for that there is also a definition array in the cli namespace. The new version of boost seems to define somewhere the namespace boost globally and so it is not anymore possilbe to compile the application. I have searched where this problem exists but I don't have found the header... I have found only that the problem exists when this 2 headeres are included #include <boost/serialization/detail/shared_ptr_132.hpp> #include <boost/archive/basic_binary_iprimitive.hpp> Has anyone an idea how I can solve the problem? Best regards Hansjörg _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Is this bugfix also already on the trunk? Peter Dimov schrieb:
This problem is caused by a MSVC bug triggered by the
using namespace boost;
directive in boost/serialization/detail/shared_ptr_132.hpp:45.
You should be able to fix that by deleting the lines
#if !BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x560) ) using namespace boost; #endif
and changing
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) ) template<class Y> explicit shared_ptr(Y * p): px(p), pn(p,boost::checked_deleter<Y>()) // Y must be complete #else template<class Y> explicit shared_ptr(Y * p): px(p), pn(p, checked_deleter<Y>()) // Y must be complete #endif

Hansi:
Is this bugfix also already on the trunk?
No, I don't believe it is. If you confirm that it works for you, Robert Ramey may (hopefully) consider applying it.
Peter Dimov schrieb:
This problem is caused by a MSVC bug triggered by the
using namespace boost;
directive in boost/serialization/detail/shared_ptr_132.hpp:45.
...

Okay. For me it seems that the compilation is possible and works correctly. Maybe robert can put the changes to the trunk? Best regards Hansjörg Peter Dimov schrieb:
Hansi:
Is this bugfix also already on the trunk?
No, I don't believe it is. If you confirm that it works for you, Robert Ramey may (hopefully) consider applying it.
Peter Dimov schrieb:
This problem is caused by a MSVC bug triggered by the
using namespace boost;
directive in boost/serialization/detail/shared_ptr_132.hpp:45.
...
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Hmm - I thought I did this - but it looks like I'm mis-remembering or perhaps I did this to some other file. I'll look in to it. Robert Ramey Hansi wrote:
Okay. For me it seems that the compilation is possible and works correctly. Maybe robert can put the changes to the trunk?
Best regards Hansjörg
Peter Dimov schrieb:
Hansi:
Is this bugfix also already on the trunk?
No, I don't believe it is. If you confirm that it works for you, Robert Ramey may (hopefully) consider applying it.
Peter Dimov schrieb:
This problem is caused by a MSVC bug triggered by the
using namespace boost;
directive in boost/serialization/detail/shared_ptr_132.hpp:45.
...
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Hansi
-
Peter Dimov
-
Robert Ramey