memory_resource File Reference

Go to the source code of this file.

## Classes

struct | std::allocator_traits< pmr::polymorphic_allocator< _Tp > >
class | std::pmr::memory_resource
struct | std::pmr::pool_options
class | std::pmr::synchronized_pool_resource
class | std::pmr::unsynchronized_pool_resource

## Namespaces

namespace | std

## Macros

#define | __cpp_lib_memory_resource
#define | __cpp_lib_polymorphic_allocator
#define | _GLIBCXX_MEMORY_RESOURCE

## Functions

memory_resource * | std::pmr::get_default_resource () noexcept
memory_resource * | std::pmr::new_delete_resource () noexcept
memory_resource * | std::pmr::null_memory_resource () noexcept
bool | std::pmr::operator== (const memory_resource &__a, const memory_resource &__b) noexcept
template<typename _Tp1 , typename _Tp2 >
bool | std::pmr::operator== (const polymorphic_allocator< _Tp1 > &__a, const polymorphic_allocator< _Tp2 > &__b) noexcept
memory_resource * | std::pmr::set_default_resource (memory_resource *__r) noexcept

## Detailed Description

This is a Standard C++ Library header.

Definition in file memory_resource.

## Macro Definition Documentation

## __cpp_lib_memory_resource

#define __cpp_lib_memory_resource

Definition at line 59 of file memory_resource.

## __cpp_lib_polymorphic_allocator

#define __cpp_lib_polymorphic_allocator

Definition at line 71 of file memory_resource.

## _GLIBCXX_MEMORY_RESOURCE

#define _GLIBCXX_MEMORY_RESOURCE

Definition at line 30 of file memory_resource.

## Function Documentation

## get_default_resource()

memory_resource * std::pmr::get_default_resource | ( |  | ) |

noexcept

Get the current default memory resource pointer.

## new_delete_resource()

memory_resource * std::pmr::new_delete_resource | ( |  | ) |

noexcept

A pmr::memory_resource that uses `new` to allocate memory.

## null_memory_resource()

memory_resource * std::pmr::null_memory_resource | ( |  | ) |

noexcept

A pmr::memory_resource that always throws `bad_alloc`

## operator==() [1/2]

bool std::pmr::operator== | ( | const memory_resource & | __a,
|  | const memory_resource & | __b
| ) |  |

inline noexcept

Definition at line 147 of file memory_resource.

## operator==() [2/2]

template<typename _Tp1 , typename _Tp2 >

bool std::pmr::operator== | ( | const polymorphic_allocator< _Tp1 > & | __a,
|  | const polymorphic_allocator< _Tp2 > & | __b
| ) |  |

inline noexcept

Definition at line 408 of file memory_resource.

## set_default_resource()

memory_resource * std::pmr::set_default_resource | ( | memory_resource * | __r | ) |

noexcept

Replace the default memory resource pointer.