diff --git a/gsl/gsl b/gsl/gsl index 12a9676..8d67933 100644 --- a/gsl/gsl +++ b/gsl/gsl @@ -78,7 +78,7 @@ class not_null static_assert(std::is_assignable::value, "T cannot be assigned nullptr."); public: - not_null(T t) : ptr_(t) { ensure_invariant(); } + explicit not_null(T t) : ptr_(t) { ensure_invariant(); } not_null& operator=(const T& t) { ptr_ = t;