a class for allocating arrays with new
More...
#include <hamr_new_allocator.h>
|
| static std::shared_ptr< T > | allocate (size_t n) |
| |
| static std::shared_ptr< T > | allocate (size_t n, const T &val) |
| |
| template<typename U > |
| static std::shared_ptr< T > | allocate (size_t n, const U *vals) |
| |
template<typename T>
struct hamr::new_allocator< T >
a class for allocating arrays with new
◆ allocate() [1/3]
allocate an array of n elements.
- Parameters
-
| [in] | n | the number of elements to allocate |
- Returns
- a shared pointer to the array that holds a deleter for the memory
◆ allocate() [2/3]
allocate an array of n elements.
- Parameters
-
| [in] | n | the number of elements to allocate |
| [in] | val | a value to initialize the elements to |
- Returns
- a shared pointer to the array that holds a deleter for the memory
◆ allocate() [3/3]
template<typename T >
template<typename U >
allocate an array of n elements.
- Parameters
-
| [in] | n | the number of elements to allocate |
| [in] | vals | an array of n values to initialize the elements with |
- Returns
- a shared pointer to the array that holds a deleter for the memory
The documentation for this struct was generated from the following file: