From 69230fa62f2978118da1baa6a34021de629e544d Mon Sep 17 00:00:00 2001 From: Werner Henze Date: Tue, 26 May 2026 21:54:47 +0200 Subject: [PATCH] remove strict_not_null move ctor, fixes issue 1246 --- include/gsl/pointers | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/gsl/pointers b/include/gsl/pointers index 436f09a4..cf0f64c8 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -297,9 +297,6 @@ public: constexpr strict_not_null(const strict_not_null& other) noexcept(std::is_nothrow_move_constructible::value) : not_null(other) {} - // To avoid invalidating the "not null" invariant, the contained pointer is actually copied - // instead of moved. If it is a custom pointer, its constructor could in theory throw exceptions. - strict_not_null(strict_not_null&& other) noexcept(std::is_nothrow_copy_constructible::value) = default; strict_not_null(const strict_not_null& other) = default; strict_not_null& operator=(const strict_not_null& other) = default; strict_not_null& operator=(const not_null& other)