From e7e3bf4f5f3509148d030d3af31b2e4555632e7f Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Mon, 14 Sep 2020 15:50:46 -0700 Subject: [PATCH] add what to narrowing_error --- include/gsl/gsl_narrow | 4 ++++ 1 file changed, 4 insertions(+) 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