Unique pointer module
std::unique_ptr like container.
It doesn't throw exceptions. Instead, asserts are used to ensure valid usage.
Files
- file bn_memory.h
- file bn_unique_ptr.h
- file bn_unique_ptr_fwd.h
Classes
-
template<typename Type, typename Deleter>struct bn::hash<unique_ptr<Type, Deleter>>
- Hash support for unique_
ptr. -
template<typename Type, typename Deleter>class bn::unique_ptr
std::unique_ptrlike container.
Functions
-
template<typename Type, class... Args>auto make_unique(Args && ... args) -> unique_ptr<Type>
- Constructs an object and wraps it in a unique_
ptr.
Function documentation
#include <bn_unique_ptr.h>
template<typename Type, class... Args>
unique_ptr<Type> make_unique(Args && ... args)
Constructs an object and wraps it in a unique_
| Template parameters | |
|---|---|
| Type | Type of the object to construct. |
| Args | Type of the arguments of the object to construct. |
| Parameters | |
| args | Parameters of the object to construct. |
| Returns | A unique_ |