Allow implicit converting of raw pointers to OwnPtrs.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
96b2bd61ab
commit
9e2805f684
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue