From 6c5fe1bf93c91787288b7f50da23109d441292a2 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 30 Mar 2020 17:28:21 +0200 Subject: [PATCH] Allow blank constructors for pointer types. --- src/Memory/BorrowedPtr.hpp | 1 + src/Memory/NonNullBorrowedPtr.hpp | 1 + src/Memory/NonNullOwnPtr.hpp | 1 + src/Memory/OwnPtr.hpp | 1 + 4 files changed, 4 insertions(+) diff --git a/src/Memory/BorrowedPtr.hpp b/src/Memory/BorrowedPtr.hpp index 1823993..acf9b78 100644 --- a/src/Memory/BorrowedPtr.hpp +++ b/src/Memory/BorrowedPtr.hpp @@ -6,6 +6,7 @@ namespace Arbutils::Memory { T* _ptr; public: + inline BorrowedPtr() {}; inline explicit constexpr BorrowedPtr(T* ptr) noexcept : _ptr(ptr){}; inline constexpr T* GetUnsafe() noexcept { return _ptr; } diff --git a/src/Memory/NonNullBorrowedPtr.hpp b/src/Memory/NonNullBorrowedPtr.hpp index 4482f9b..af03869 100644 --- a/src/Memory/NonNullBorrowedPtr.hpp +++ b/src/Memory/NonNullBorrowedPtr.hpp @@ -9,6 +9,7 @@ namespace Arbutils::Memory { T* _ptr; public: + inline NonNullBorrowedPtr() {}; inline explicit NonNullBorrowedPtr(T* ptr) : _ptr(ptr){ AssertNotNull(ptr); }; diff --git a/src/Memory/NonNullOwnPtr.hpp b/src/Memory/NonNullOwnPtr.hpp index f12be61..7ed715f 100644 --- a/src/Memory/NonNullOwnPtr.hpp +++ b/src/Memory/NonNullOwnPtr.hpp @@ -10,6 +10,7 @@ namespace Arbutils::Memory { T* _ptr; public: + inline NonNullOwnPtr() {}; inline explicit NonNullOwnPtr(T* ptr) : _ptr(ptr) { AssertNotNull(ptr); }; NonNullOwnPtr(const NonNullOwnPtr&) = delete; diff --git a/src/Memory/OwnPtr.hpp b/src/Memory/OwnPtr.hpp index 7be70e0..777e395 100644 --- a/src/Memory/OwnPtr.hpp +++ b/src/Memory/OwnPtr.hpp @@ -9,6 +9,7 @@ namespace Arbutils::Memory { T* _ptr; public: + inline OwnPtr() {}; inline explicit constexpr OwnPtr(T* ptr) noexcept : _ptr(ptr){}; OwnPtr(const OwnPtr&) = delete;