ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | List of all members
base::core::ref_count_ptr< T > Class Template Reference

A smart pointer that holds a reference-counted object and releases it on destruction. More...

#include <refcount.h>

Inheritance diagram for base::core::ref_count_ptr< T >:
Collaboration diagram for base::core::ref_count_ptr< T >:

Public Member Functions

std::unique_ptr< T, ref_count_deleterget_new_ref () const
 Adds a new reference to the owned object.
 

Detailed Description

template<typename T>
class base::core::ref_count_ptr< T >

A smart pointer that holds a reference-counted object and releases it on destruction.

A smart pointer that unrefs the owned object on destruction.

Template Parameters
TType of the object.

Member Function Documentation

◆ get_new_ref()

template<typename T >
std::unique_ptr< T, ref_count_deleter > base::core::ref_count_ptr< T >::get_new_ref ( ) const
inline

Adds a new reference to the owned object.

Returns
A smart pointer holding the reference to the object.

The documentation for this class was generated from the following file: