|
Backport
|
This header provides definitions from the C++ header <memory> More...
#include "detail/config.hpp"#include "type_traits.hpp"#include "utility.hpp"#include <memory>#include <cstddef>#include <type_traits>
Include dependency graph for memory.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Typedefs | |
| template<typename T > | |
| using | bpstd::detail::to_address_result_t = typename to_address_result< T >::type |
Functions | |
| template<typename T , typename... Args> | |
| std::unique_ptr< typename detail::make_unique_result< T >::object > | bpstd::make_unique (Args &&...args) |
| Constructs an object of type T and wraps it in a std::unique_ptr. More... | |
| template<typename T > | |
| std::unique_ptr< typename detail::make_unique_result< T >::unbounded_array > | bpstd::make_unique (std::size_t size) |
| Constructs an object of type T[] and wraps it in a std::unique_ptr. More... | |
| template<typename T > | |
| std::unique_ptr< typename detail::make_unique_result< T >::bounded_array > | bpstd::make_unique ()=delete |
| template<typename T > | |
| std::unique_ptr< typename detail::make_unique_result< T >::object > | bpstd::make_unique_for_overwrite () |
| Constructs an object of type T through default-initialization and wraps it in a std::unique_ptr. More... | |
| template<typename T > | |
| std::unique_ptr< typename detail::make_unique_result< T >::unbounded_array > | bpstd::make_unique_for_overwrite (std::size_t size) |
| Constructs an object of type T[] through default-initialization and wraps it in a std::unique_ptr. More... | |
| template<typename T > | |
| std::unique_ptr< typename detail::make_unique_result< T >::bounded_array > | bpstd::make_unique_for_overwrite ()=delete |
| template<typename T > | |
| constexpr BPSTD_INLINE_VISIBILITY auto | bpstd::detail::to_address_impl (const T &p, std::true_type) -> decltype(std::pointer_traits< T >::to_address(std::declval< const T & >())) |
| template<typename T > | |
| constexpr BPSTD_INLINE_VISIBILITY auto | bpstd::detail::to_address_impl (const T &p, std::false_type) -> decltype(std::declval< const T & >().operator->()) |
| template<typename T > | |
| constexpr T * | bpstd::to_address (T *p) noexcept |
| Converts a pointer-like type to a raw pointer by recursively calling to_address on it. More... | |
| template<typename T > | |
| constexpr detail::to_address_result_t< T > | bpstd::to_address (const T &p) noexcept |
| Converts a pointer-like type to a raw pointer by recursively calling to_address on it. More... | |
| template<typename T > | |
| constexpr T * | bpstd::to_address (T *p) noexcept |
| Converts a pointer-like type to a raw pointer by recursively calling to_address on it. More... | |
| template<typename T > | |
| constexpr detail::to_address_result_t< T > | bpstd::to_address (const T &p) noexcept |
| Converts a pointer-like type to a raw pointer by recursively calling to_address on it. More... | |
This header provides definitions from the C++ header <memory>
Definition in file memory.hpp.
| std::unique_ptr<typename detail::make_unique_result<T>::object> bpstd::make_unique | ( | Args &&... | args | ) |
Constructs an object of type T and wraps it in a std::unique_ptr.
Constructs a non-array type T. The arguments args are passed to the constructor of T. This overload only participates in overload resolution if T is not an array type.
| T | the type to construct |
| args | the arguments to forward to T's constructor |
| std::unique_ptr<typename detail::make_unique_result<T>::unbounded_array> bpstd::make_unique | ( | std::size_t | size | ) |
Constructs an object of type T[] and wraps it in a std::unique_ptr.
Constructs an array of unknown bound T. This overload only participates in overload resolution if T is an array of unknown bound.
| T | the type to construct |
| size | the size of the array |
| std::unique_ptr<typename detail::make_unique_result<T>::object> bpstd::make_unique_for_overwrite | ( | ) |
Constructs an object of type T through default-initialization and wraps it in a std::unique_ptr.
Constructs a non-array type T. This overload only participates in overload resolution if T is not an array type. The object is default-initialised, which may mean it will need to be overwritten before it is legal to be read
| T | the type to construct |
| std::unique_ptr<typename detail::make_unique_result<T>::unbounded_array> bpstd::make_unique_for_overwrite | ( | std::size_t | size | ) |
Constructs an object of type T[] through default-initialization and wraps it in a std::unique_ptr.
Constructs an array of unknown bound T. This overload only participates in overload resolution if T is an array of unknown bound. The array is default-initialised, which may mean it will need to be overwritten before it is legal to be read
| T | the type to construct |
|
constexprnoexcept |
Converts a pointer-like type to a raw pointer by recursively calling to_address on it.
| p | the pointer-like type |
|
constexprnoexcept |
Converts a pointer-like type to a raw pointer by recursively calling to_address on it.
| p | the pointer-like type |