template<typename TypeT, typename RcT = RC<thread_unsafe_refcount>>
class openvpn::RcEnable< TypeT, RcT >
A class template that enables reference counting for a given type.
This class inherits from both the TypeT and RcT (Reference Counting) classes. It provides a convenient way to create reference-counted objects of TypeT.
- Template Parameters
-
Definition at line 28 of file make_rc.hpp.
template<typename TypeT , typename RcT = RC<thread_unsafe_refcount>>
template<typename... ArgsT>
Private constructor for RcEnable.
This constructor is used to create a new instance of RcEnable with the provided arguments. It initializes the base classes TypeT and RcT with the forwarded arguments.
- Template Parameters
-
ArgsT | The parameter pack types for the arguments to be forwarded to the base class constructors. |
- Parameters
-
args | The arguments to be forwarded to the base class constructors. |
- Note
- This constructor is private and should not be called directly. Use the Create() function to create instances of RcEnable.
Definition at line 61 of file make_rc.hpp.
template<typename TypeT , typename RcT = RC<thread_unsafe_refcount>>
template<typename... ArgsT>
Creates a new instance of RcEnable with the given arguments.
This function creates a new RcEnable object using the provided arguments and returns a smart pointer (Ptr) to the created object.
- Template Parameters
-
ArgsT | The parameter pack types for the arguments to be forwarded to the RcEnable constructor. |
- Parameters
-
args | The arguments to be forwarded to the RcEnable constructor. |
- Returns
- A smart pointer (Ptr) to the newly created RcEnable object with intrusive ref count.
Definition at line 43 of file make_rc.hpp.