operator_new overloads
Declared in <folly/lang/New.h>
Allocates s bytes and returns a pointer to the storage.
[[nodiscard]]
void*
operator_new(std::size_t const s) noexcept(noexcept(::operator new(0)));
» more...
Allocates s bytes with the given alignment.
[[nodiscard]]
void*
operator_new(
std::size_t const s,
std::align_val_t const a) noexcept(noexcept(::operator new(0)));
» more...
Allocates s bytes without throwing, returning null on failure.
[[nodiscard]]
void*
operator_new(
std::size_t const s,
std::nothrow_t const& nt) noexcept;
» more...
Allocates s bytes with the given alignment without throwing.
[[nodiscard]]
void*
operator_new(
std::size_t const s,
std::align_val_t const a,
std::nothrow_t const& nt) noexcept;
» more...
The return value should not be discarded.
| Name | Description |
|---|---|
| s | The number of bytes to allocate. |
| a | The alignment of the allocated storage. |
| nt | The nothrow tag selecting the non-throwing overload. |