A logic_error is a domain_error. A runtime_error is a range_error.
Reference: The C++ Standard Library
A way to remember this:
It is a logic_error for providing bad input (domain) to an object.
During an object's runtime, something might go out of range.
(It's just a mnemonic)
No comments:
Post a Comment