Allow implicit converting of raw pointers to OwnPtrs.
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-03-30 17:45:31 +02:00
1 parent 96b2bd61ab
commit 9e2805f684
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ namespace Arbutils::Memory {
public: public:
inline NonNullOwnPtr() {}; inline NonNullOwnPtr() {};
inline explicit NonNullOwnPtr(T* ptr) : _ptr(ptr) { AssertNotNull(ptr); }; inline NonNullOwnPtr(T* ptr) : _ptr(ptr) { AssertNotNull(ptr); };
NonNullOwnPtr<T>(const NonNullOwnPtr<T>&) = delete; NonNullOwnPtr<T>(const NonNullOwnPtr<T>&) = delete;
+1 -1
View File
@@ -10,7 +10,7 @@ namespace Arbutils::Memory {
public: public:
inline OwnPtr() { _ptr = nullptr; }; inline OwnPtr() { _ptr = nullptr; };
inline explicit constexpr OwnPtr(T* ptr) noexcept : _ptr(ptr){}; inline constexpr OwnPtr(T* ptr) noexcept : _ptr(ptr){};
OwnPtr<T>(const OwnPtr<T>&) = delete; OwnPtr<T>(const OwnPtr<T>&) = delete;