Added const variants of Borrow.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
ae73e60f94
commit
d46b0d798a
|
@ -21,6 +21,10 @@ namespace Arbutils::Memory {
|
||||||
|
|
||||||
inline NonNullBorrowedPtr<T> Borrow() { return NonNullBorrowedPtr<T>(_ptr); }
|
inline NonNullBorrowedPtr<T> Borrow() { return NonNullBorrowedPtr<T>(_ptr); }
|
||||||
|
|
||||||
|
inline const NonNullBorrowedPtr<const T> Borrow() const{
|
||||||
|
return NonNullBorrowedPtr<const T>(_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
T* operator->() noexcept { return _ptr; }
|
T* operator->() noexcept { return _ptr; }
|
||||||
const T* operator->() const noexcept { return _ptr; }
|
const T* operator->() const noexcept { return _ptr; }
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ namespace Arbutils::Memory {
|
||||||
inline BorrowedPtr<T> Borrow(){
|
inline BorrowedPtr<T> Borrow(){
|
||||||
return BorrowedPtr<T>(_ptr);
|
return BorrowedPtr<T>(_ptr);
|
||||||
}
|
}
|
||||||
|
inline const BorrowedPtr<const T> Borrow() const{
|
||||||
|
return BorrowedPtr<const T>(_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
T* operator->() noexcept { return _ptr; }
|
T* operator->() noexcept { return _ptr; }
|
||||||
const T* operator->() const noexcept { return _ptr; }
|
const T* operator->() const noexcept { return _ptr; }
|
||||||
|
|
Loading…
Reference in New Issue