#include <ref.hh>
Public Member Functions | |
ref (const std::shared_ptr< T > &p) | |
ref (T *p) | |
T * | operator-> () const |
T & | operator* () const |
operator std::shared_ptr< T > () const | |
std::shared_ptr< T > | get_ptr () const |
template<typename T2> | |
ref< T2 > | cast () const |
template<typename T2> | |
std::shared_ptr< T2 > | dynamic_pointer_cast () const |
template<typename T2> | |
operator ref< T2 > () const | |
bool | operator== (const ref< T > &other) const |
bool | operator!= (const ref< T > &other) const |
auto | operator<=> (const ref< T > &other) const |
Friends | |
template<typename T2, typename... Args> | |
ref< T2 > | make_ref (Args &&... args) |
A simple non-nullable reference-counted pointer. Actually a wrapper around std::shared_ptr that prevents null constructions.