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))