diff --git a/include/gsl/gsl b/include/gsl/gsl index c620a09..26742be 100644 --- a/include/gsl/gsl +++ b/include/gsl/gsl @@ -25,6 +25,7 @@ #include // span #include // zstring, string_span, zstring_builder... #include +#include #if defined(_MSC_VER) && _MSC_VER < 1910 #pragma push_macro("constexpr") @@ -109,6 +110,13 @@ private: T ptr_; }; +template +std::ostream& operator<<(std::ostream& os, const not_null& val) +{ + os << val.get(); + return os; +} + // more unwanted operators template std::ptrdiff_t operator-(const not_null&, const not_null&) = delete;