diff --git a/include/gsl/pointers b/include/gsl/pointers index 163a2fe..b2804a3 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -82,6 +82,7 @@ public: { } + not_null(not_null&& other) = default; not_null(const not_null& other) = default; not_null& operator=(const not_null& other) = default; diff --git a/tests/notnull_tests.cpp b/tests/notnull_tests.cpp index 4baf7b3..a7ef27e 100644 --- a/tests/notnull_tests.cpp +++ b/tests/notnull_tests.cpp @@ -327,3 +327,5 @@ TEST_CASE("TestNotNullCustomPtrComparison") CHECK((NotNull1(p1) >= NotNull2(p2)) == (p1 >= p2)); CHECK((NotNull2(p2) >= NotNull1(p1)) == (p2 >= p1)); } + +static_assert(std::is_nothrow_move_constructible>::value, "not_null must be no-throw move constructible");