diff options
author | Jordan Maples <jomaples@microsoft.com> | 2020-09-14 15:50:46 -0700 |
---|---|---|
committer | Jordan Maples <jomaples@microsoft.com> | 2020-09-14 15:50:46 -0700 |
commit | e7e3bf4f5f3509148d030d3af31b2e4555632e7f (patch) | |
tree | a804e2dcaae2a4d045c385eeadcdde7f093569e3 | |
parent | 21b69e5ccedb036ea3c0c6275519cbe51a8dbc03 (diff) | |
download | Microsoft-GSL-e7e3bf4f5f3509148d030d3af31b2e4555632e7f.tar.gz |
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
|