From be12a61e7f8c043570056ca15594c1984c532a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Krzemie=C5=84ski?= Date: Mon, 24 Oct 2016 10:50:18 +0200 Subject: [PATCH] explicit not_null constructor --- gsl/gsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;