class
TSharedRef
Shared reference that is never null
- Module
- Arc
- Header
#include "Arc/Core/ArcMemory.h"- Namespace
Arcf- Template
template<typename T>
Constructors
| Signature | Name | Description |
|---|---|---|
TSharedRef(const TSharedPtr<T>& ptr) : m_ptr(ptr.m_ptr) | TSharedRef | |
TSharedRef(TSharedPtr<T>&& ptr) : m_ptr(std::move(ptr.m_ptr)) | TSharedRef | |
TSharedRef(const TSharedRef&) = default | TSharedRef | |
TSharedRef(TSharedRef&&) noexcept = default | TSharedRef | |
template<typename U, typename = std::enable_if_t<std::is_convertible_v<U*, T*>>>… | TSharedRef |
Public functions
| Returns | Name | Description |
|---|---|---|
TSharedRef& | operator= | |
TSharedRef& | operator= | |
T* | operator-> | |
T& | operator* | |
T* | Get | |
operatorTSharedPtr<T> | ||
bool | operator== | |
bool | operator!= |
Function details
TSharedRef
C++
TSharedRef(const TSharedPtr<T>& ptr) : m_ptr(ptr.m_ptr)TSharedRef
C++
TSharedRef(TSharedPtr<T>&& ptr) : m_ptr(std::move(ptr.m_ptr))TSharedRef
C++
TSharedRef(const TSharedRef&) = defaultTSharedRef
C++
TSharedRef(TSharedRef&&) noexcept = defaultTSharedRef
C++
template<typename U, typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> TSharedRef(const TSharedRef<U>& other) : m_ptr(other.m_ptr)operator=
C++
TSharedRef& operator=(const TSharedRef&) = defaultoperator=
C++
TSharedRef& operator=(TSharedRef&&) noexcept = defaultoperator->
C++
T* operator->() constoperator*
C++
T& operator*() constGet
C++
T* Get() constoperatorTSharedPtr<T>
C++
operator TSharedPtr<T>() constoperator==
C++
bool operator==(const TSharedRef& other) constoperator!=
C++
bool operator!=(const TSharedRef& other) constGenerated from Arc/Core/ArcMemory.h via arc.json · Nov 5, 2026Version 1.0.0