The following constructors is a C ++ 11 function that is not available in C ++ 03 (which you seem to be using, as I can tell from the specifications of dynamic exceptions).
However, even in C ++ 11, you will need an declaration usingto inherit the constructor of the base class:
class MyException : public std::logic_error {
public:
using std::logic_error::logic_error;
};
, std::string const char* :
class MyException : public std::logic_error {
public:
MyException(std::string const& msg) : std::logic_error(msg) { }
};