namespace std {
class domain_error : public logic_error {
public:
explicit domain_error(const string& what_arg);
explicit domain_error(const char* what_arg);
};
}
The class domain_error defines the type of objects thrown as exceptions by the implementation to report domain errors.
Effects: Constructs an object of class domain_error.
Postcondition: strcmp(what(), what_arg.c_str()) == 0.
domain_error(const char* what_arg);
Effects: Constructs an object of class domain_error.
Postcondition: strcmp(what(), what_arg) == 0.