From 423841e965ee72a474f176b16b79ce421549d5b9 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 3 May 2018 08:08:41 +0200 Subject: [PATCH] fix requirement on not_null template it should be comparable to nullptr, it does not have to be assignable --- include/gsl/pointers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gsl/pointers b/include/gsl/pointers index ad15ce3..891dfc5 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -69,7 +69,7 @@ template class not_null { public: - static_assert(std::is_assignable::value, "T cannot be assigned nullptr."); + static_assert(std::is_convertible() != nullptr), bool>::value, "T cannot be compared to nullptr."); template ::value>> constexpr explicit not_null(U&& u) : ptr_(std::forward(u))