diff options
| author | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2020-08-12 15:28:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-12 15:28:25 -0700 |
| commit | ef714fa49e43254ae9d448702e17a527e97d42e5 (patch) | |
| tree | 25bad13e67fd98dc5460bad8361750b66743d932 | |
| parent | 9355982fc5b64727c6506109f60cad25d272b18f (diff) | |
| parent | 423841e965ee72a474f176b16b79ce421549d5b9 (diff) | |
| download | platform_external_Microsoft-GSL-ef714fa49e43254ae9d448702e17a527e97d42e5.tar.gz platform_external_Microsoft-GSL-ef714fa49e43254ae9d448702e17a527e97d42e5.tar.bz2 platform_external_Microsoft-GSL-ef714fa49e43254ae9d448702e17a527e97d42e5.zip | |
Merge pull request #676 from ericLemanissier/patch-3
fix requirement on not_null template
| -rw-r--r-- | include/gsl/pointers | 2 |
1 files changed, 1 insertions, 1 deletions
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 T> class not_null { public: - static_assert(std::is_assignable<T&, std::nullptr_t>::value, "T cannot be assigned nullptr."); + static_assert(std::is_convertible<decltype(std::declval<T>() != nullptr), bool>::value, "T cannot be compared to nullptr."); template <typename U, typename = std::enable_if_t<std::is_convertible<U, T>::value>> constexpr not_null(U&& u) : ptr_(std::forward<U>(u)) |
