Problem with exception and property tree in 1.41.0.

Hello,
I have tried 1.41.0, especially PropertyTree. I used cross compiler
arm-linux-g++ version 3.2.2 and example from property tree
(debug_settings.cpp). My compilation has failed with these output :
In file included
from /usr/local/arm-linux/arm-linux/include/boost/thread/future.hpp:12,
from /usr/local/arm-linux/arm-linux/include/boost/thread.hpp:24,
from /home/jakub/projects/tigris/agent/src/main/cpp/agent/Agent.cpp:10:
/usr/local/arm-linux/arm-linux/include/boost/exception_ptr.hpp:43:
error: looser
throw specifier for `virtual boost::exception_ptr::~exception_ptr()'
/usr/local/arm-linux/arm-linux/include/boost/exception/detail/exception_ptr_base.hpp:27: error:
overriding `virtual
boost::exception_detail::exception_ptr_base::~exception_ptr_base()
throw ()'
/usr/local/arm-linux/arm-linux/include/boost/exception_ptr.hpp:43:
error: looser
throw specifier for `virtual boost::exception_ptr::~exception_ptr()'
/usr/local/arm-linux/arm-linux/include/boost/exception/detail/exception_ptr_base.hpp:27: error:
overriding `virtual
boost::exception_detail::exception_ptr_base::~exception_ptr_base()
throw ()'
/usr/local/arm-linux/arm-linux/include/boost/exception_ptr.hpp:43:
error: looser
throw specifier for `virtual boost::exception_ptr::~exception_ptr()'
/usr/local/arm-linux/arm-linux/include/boost/exception/detail/exception_ptr_base.hpp:27: error:
overriding `virtual
boost::exception_detail::exception_ptr_base::~exception_ptr_base()
throw ()'
In file included
from /usr/local/arm-linux/arm-linux/include/boost/property_tree/xml_parser.hpp:19,
from /home/jakub/projects/tigris/agent/src/main/cpp/agent/Agent.cpp:17:
/usr/local/arm-linux/arm-linux/include/boost/property_tree/detail/xml_parser_read_rapidxml.hpp: In
function `void
boost::property_tree::xml_parser::read_xml_internal(std::basic_istream

2009/11/19 Jakub Herkel
I have compared old and new version of file exception_ptr_base.hpp and there is one difference. The new version added a virtual destructor. When I removed this line, the first problem was solved. My question is (because I'm not an expert in Boost) : Can I remove this virtual destructor without any consequence?
You can safely remove the 'virtual' - it was only added to suppress a warning in later versions of gcc. Although you should keep the protected destructor. Reverse this change: https://svn.boost.org/trac/boost/changeset/57419
For the second problem I think that STL library which is used in arm-linux toolchain is a little bit old. But maybe I'm wrong. As a temporary fix I also removed this line. But I hope that there is a better solution how to fix it. Could someone show me the way how I can solve it?
It's hard to say. Gcc 3.2 is very old and we don't really support it. I had a look at the gnu arm site, and they only had more recent versions. But try the attached patch. Daniel

Sorry ignore that patch. I'll take another look at it when I get home. Daniel

Sorry ignore that patch. I'll take another look at it when I get home. Daniel

2009/11/19 Daniel James
Sorry ignore that patch. I'll take another look at it when I get home.
Sorry about the duplicate mail. I lost my connection and I thought I hadn't sent it. The problem is that gcc 3.2 doesn't support explicit member template calls. A more recent version will be okay. It would be possible to get this to work by adding an extra method in rapidxml's exception class that returns a void pointer to the error and then casting that result to the appropriate pointer. Although that might not be appropriate as I think it's written by a third-party. An inferior alternative is the patch I've attached which just gives a line number of 0 for the parse error when member templates aren't supported. It's up to the Sebastian Redl if he wants to fix this, he'd be justified in not doing so since the compiler is very old. Daniel

Thanks for your responses, they were very helpful for me.
jakub
-----Original Message-----
From: Daniel James
Sorry ignore that patch. I'll take another look at it when I get home.
Sorry about the duplicate mail. I lost my connection and I thought I hadn't sent it. The problem is that gcc 3.2 doesn't support explicit member template calls. A more recent version will be okay. It would be possible to get this to work by adding an extra method in rapidxml's exception class that returns a void pointer to the error and then casting that result to the appropriate pointer. Although that might not be appropriate as I think it's written by a third-party. An inferior alternative is the patch I've attached which just gives a line number of 0 for the parse error when member templates aren't supported. It's up to the Sebastian Redl if he wants to fix this, he'd be justified in not doing so since the compiler is very old. Daniel _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

On Thu, Nov 19, 2009 at 12:37 AM, Jakub Herkel
There are two problems: 1) One in file boost/exception/detail/exception_ptr_base.hpp
This bug is already fixed, unfortunately after the release was out. The attached patch should fix the problem, or use this version: http://svn.boost.org/svn/boost/branches/release/boost/exception_ptr.hpp. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
participants (3)
-
Daniel James
-
Emil Dotchevski
-
Jakub Herkel