diff --git a/include/gsl.h b/include/gsl.h index 1405993..a73db6b 100644 --- a/include/gsl.h +++ b/include/gsl.h @@ -223,12 +223,12 @@ public: template ::value>> - maybe_null_dbg(const maybe_null_dbg &other) : ptr_(other.get()), tested_(false) {} + maybe_null_dbg(const maybe_null_dbg &other) : ptr_(other.ptr_), tested_(false) {} template ::value>> maybe_null_dbg& operator=(const maybe_null_dbg &other) { - ptr_ = other.get(); + ptr_ = other.ptr_; tested_ = false; return *this; } diff --git a/tests/maybenull_tests.cpp b/tests/maybenull_tests.cpp index 944307e..661b26a 100644 --- a/tests/maybenull_tests.cpp +++ b/tests/maybenull_tests.cpp @@ -289,9 +289,7 @@ SUITE(MaybeNullTests) mnBase_dbg2 = nnBase; // maybe_null_dbg = not_null maybe_null_dbg mnDerived_dbg(&derived); - CHECK(mnDerived_dbg.present()); mnBase_dbg2 = mnDerived_dbg; // maybe_null_dbg = maybe_null_dbg - mnBase_dbg1 = &derived; // maybe_null_dbg = U; mnBase_dbg1 = nnDerived; // maybe_null_dbg = not_null