I have looked at this problem and don't see where the problem is. I'm not an expert at C++ so to me this looks OK. This used to compile without issue the last time I tried.
namespace yaaf {
/************************************************************************/
/* */
/* Standard YAAF Errors */
/* */
/************************************************************************/
/* XGYAAFError
*
* YAAF Error; this is the root of my YAAF errors, and is
* a descendant of the standard exception class
*/
class XGYAAFError : public std::exception {
public:
explicit XGYAAFError(const char *);
explicit XGYAAFError(const std::string &err);
const char *what() const throw()
{
return fError.c_str();
}
private:
std::string fError;
};
} // namespace yaaf
#endif
The GCC library base class...
/**
* @brief Base class for all library exceptions.
*
* This is the base class for all exceptions thrown by the standard
* library, and by certain language expressions. You are free to derive
* your own %exception classes, or use a different hierarchy, or to
* throw non-class data (e.g., fundamental types).
*/
class exception
{
public:
exception() throw() { }
virtual ~exception() throw();
/** Returns a C-style character string describing the general cause
* of the current error. */
virtual const char* what() const throw();
};
The error " specification of overriding function is more lax than base version" is what I now get when I try to build.
I think that this may have to do with a change in the C++ language ( about 2004??) and where you can declare pointer within a derived class. But I'm not sure if that's the case here and how to go about fixing this.
Any ideas on what specifically is wrong or how I can fix this is appreciated.
Thanks