std::experimental::pmr:: null_memory_resource
From cppreference.net
<
cpp
|
experimental
C++
Experimental
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
Polymorphic allocator library
Convenience aliases for containers using
polymorphic_allocator
|
||||
| Memory resource classes | ||||
| Global memory resources | ||||
|
null_memory_resource
|
||||
| Type-erased allocator support for existing classes | ||||
|
ヘッダーで定義
<experimental/memory_resource>
|
||
|
memory_resource
*
null_memory_resource
(
)
noexcept
;
|
(ライブラリファンダメンタルTS) | |
メモリ割り当てを一切行わない
memory_resource
へのポインタを返します。
戻り値
静的記憶域期間を持つオブジェクトへのポインタ
p
を返します。このオブジェクトの型は
std::experimental::pmr::memory_resource
から派生しており、以下の特性を持ちます:
-
その
allocate()関数は常に std::bad_alloc を送出する; -
その
deallocate()関数は何の効果も持たない; -
任意の
memory_resourcerについて、p->is_equal(r)は&r == pを返す。
この関数が呼び出されるたびに同じ値が返されます。