std::experimental:: erased_type
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 |
|
定义于头文件
<experimental/utility>
|
||
|
struct
erased_type
{
}
;
|
(库基础技术规范)
(于库基础技术规范 v3 中移除) |
|
类
erased_type
是一个空结构体,在运行时确定实际类型的场景中作为类型占位符使用。例如,在使用
类型擦除分配器
的类中,嵌套类型定义
allocator_type
是
erased_type
的别名。
注释
erased_type
已在 LFTS v3 中移除,因为
std::
pmr
::
polymorphic_allocator
<>
更适合用于类型擦除。