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

This commit is contained in:
Deukhoofd 2020-03-30 17:45:31 +02:00
parent 96b2bd61ab
commit 9e2805f684
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ namespace Arbutils::Memory {
public:
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;

View File

@ -10,7 +10,7 @@ namespace Arbutils::Memory {
public:
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;