diff --git a/include/gsl/pointers b/include/gsl/pointers index 0ec0fc3..bb80b92 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -63,7 +63,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 not_null(U&& u) : ptr_(std::forward(u))