19 Diagnostics library [diagnostics]

19.2 Exception classes [std.exceptions]

19.2.3 Class domain_­error [domain.error]

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.
domain_error(const string& what_arg);
Ensures: strcmp(what(), what_­arg.c_­str()) == 0.
domain_error(const char* what_arg);
Ensures: strcmp(what(), what_­arg) == 0.