diff options
author | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2020-09-14 16:51:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 16:51:38 -0700 |
commit | bd803cc7cf75cf57f6c74692df636fc9f019245b (patch) | |
tree | a804e2dcaae2a4d045c385eeadcdde7f093569e3 | |
parent | 21b69e5ccedb036ea3c0c6275519cbe51a8dbc03 (diff) | |
parent | e7e3bf4f5f3509148d030d3af31b2e4555632e7f (diff) | |
download | Microsoft-GSL-bd803cc7cf75cf57f6c74692df636fc9f019245b.tar.gz |
Merge pull request #928 from JordanMaples/narrowing_error-add-what
add what to narrowing_error
-rw-r--r-- | include/gsl/gsl_narrow | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gsl/gsl_narrow b/include/gsl/gsl_narrow index 7027b58..cec25a1 100644 --- a/include/gsl/gsl_narrow +++ b/include/gsl/gsl_narrow @@ -22,6 +22,10 @@ namespace gsl {
struct narrowing_error : public std::exception
{
+ const char* what() const noexcept override
+ {
+ return "narrowing_error";
+ }
};
// narrow() : a checked version of narrow_cast() that throws if the cast changed the value
|