// // Created by erki on 25/10/23. // #pragma once #include "utility_assert.hpp" namespace Utility { template struct NotNull { NotNull(T* ptr) : ptr_(ptr) { SKULLC_ASSERT_DEBUG(ptr_ != nullptr); } NotNull() = delete; NotNull(const NotNull&) = delete; NotNull(NotNull&&) = delete; NotNull& operator=(const NotNull&) = delete; NotNull& operator=(NotNull&&) = delete; const T& operator*() const { return *ptr_; } T& operator*() { return *ptr_; } const T* operator->() const noexcept { return ptr_; } T* operator->() noexcept { return ptr_; } private: T* ptr_; }; }// namespace Utility