|
Boost : |
From: Kowalke Oliver (QD IT PA AS) (Oliver.Kowalke_at_[hidden])
Date: 2008-06-17 03:09:24
Hi,
I'm using boost.exception from trunk and I get following error (gcc-4.2.4):
error: request for member 'what' is ambiguous
/usr/include/c++/4.2/exception:64: error: candidates are: virtual const char* std::exception::what() const
/opt/boost/include/boost-1_35/boost/exception/exception.hpp:52: error: virtual const char* boost::exception::what() const
I'm using the code from the boost.exception tutorial:
class error
:
public boost::exception,
public std::exception
{}
...
try
{...}
catch ( error const& e)
{ std::cout << "error: " << e.what() << std::endl; }
// solves the error
class error
:
public boost::exception,
public std::exception
{
public:
char const * what() const throw()
{ return boost::exception::what(); }
};
Oliver
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk