On Thu, 2006-02-23 at 12:25 +0100, Axel Naumann wrote:
> Hi,
>
> this is a known limitation that we'll make vanish soon. Until then, use
> ClassDef(RangeError,0), or hide RangeError from rootcint:
>
> #ifdef __MAKECINT__
> class RangeError;
> #else
> class RangeError: public std::exception {
> // the real class definition
> ... };
> #endif
What about defining the destructor himself?
> cat foo.hh
#include <stdexcept>
#include <cerrno>
struct foo : public std::exception
{
std::string _msg;
foo(int eno) : _msg(strerror(eno)) {}
// Un-comment to succeed
// virtual ~foo() throw () {}
const char* what() const throw() { return _msg.c_str(); }
};
> rootcint -f foodict.cc -c foo.hh
> g++ foodict.cc -c `root-config --cflags`
foo.hh:5: error: looser throw specifier for 'virtual
foo::~foo()'
Un-commenting the line marked above, solves the problem.
Yours,
--
___ | Christian Holm Christensen
|_| | -------------------------------------------------------------
| | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91
_| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91
_| Denmark Office: (+45) 353 25 404
____| Email: cholm_at_nbi.dk Web: www.nbi.dk/~cholm
| |
Received on Thu Feb 23 2006 - 17:03:29 MET
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET