Hi,
I've used the boost.exception from svn (Revision 44352) and got the
compile errors:
$ LANG=en g++ -I ../../3rd_party/boost-svn/ -Wall eh.cpp -o eh && ./eh
../../3rd_party/boost-svn/boost/exception/info.hpp: In function
'boost::shared_ptr<const typename ErrorInfo::value_type>
boost::get_error_info(const E&) [with ErrorInfo =
boost::error_info, E =
boost::exception]':
eh.cpp:21: instantiated from here
../../boost-svn/boost/exception/info.hpp:104: error: no matching
function for call to 'boost::shared_ptr::shared_ptr(boost::shared_ptr<const
boost::exception_detail::error_info_base>&, const char* const*)'
/usr/include/boost/shared_ptr.hpp:144: note: candidates are:
boost::shared_ptr<T>::shared_ptr() [with T = const char* const]
/usr/include/boost/shared_ptr.hpp:131: note:
boost::shared_ptr::shared_ptr(const
boost::shared_ptr&)
from this file:
#include
#include
#include
#include <exception>
#include
#include <iostream>
struct test_exception : boost::exception {};
int main()
{
try {
throw test_exception()
<< BOOST_ERROR_INFO
;
}
catch( const boost::exception& e ) {
using namespace boost;
std::cerr << "Caught exception:\n" << e.what() << "\n";
shared_ptr function =
get_error_info( e );
// shared_ptr file =
get_error_info( e );
// shared_ptr line = get_error_info( e );
// std::cerr << " in " << file << "(" << line << "): " <<
function << std::endl;
}
}
BTW, the example_io.cpp doesn't compile too. Do I have to use the
complete svn trunk?
Thanks,
Olaf