|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
Functions | |
| template<typename T , typename... Args> | |
| std::unique_ptr< T > | make_unique_nothrow (Args &&... args) |
| Creates a unique_ptr using nothrow new for exception-free design. | |
| template<typename T > | |
| std::unique_ptr< T[]> | make_unique_array_nothrow (size_t size) |
| Creates a unique_ptr for arrays using nothrow new. | |
| std::unique_ptr< T[]> hf::utils::make_unique_array_nothrow | ( | size_t | size | ) |
Creates a unique_ptr for arrays using nothrow new.
Specialized version for creating arrays with nothrow allocation.
| T | The array element type |
| size | Number of elements to allocate |
Creates a unique_ptr using nothrow new for exception-free design.
This function template provides a safe alternative to std::make_unique for environments that require no-exception guarantees. It uses nothrow new to allocate memory and returns nullptr on allocation failure instead of throwing std::bad_alloc.
| T | The type to create |
| Args | Parameter pack for constructor arguments |
| args | Arguments to forward to T's constructor |