命名空间
变体
操作

std::experimental::erased_type

来自 cppreference.cn
 
 
实验性
技术规范
文件系统库 (filesystem TS)
库基础 (library fundamentals TS)
库基础 2 (library fundamentals TS v2)
库基础 3 (library fundamentals TS v3)
并行性扩展 (parallelism TS)
并行性扩展 2 (parallelism TS v2)
并发性扩展 (concurrency TS)
并发性扩展 2 (concurrency TS v2)
概念 (concepts TS)
范围 (ranges TS)
反射 (reflection TS)
数学特殊函数 (special functions TR)
实验性非 TS
模式匹配
线性代数
std::execution
契约
2D 图形
 
 
定义于头文件 <experimental/utility>
struct erased_type { };
(库基础 TS)
(在库基础 TS v3 中移除)

erased_type 是一个空结构体,在运行时确定实际类型的情况下,用作类型的占位符。例如,在使用类型擦除分配器的类中,嵌套的 typedef allocator_typeerased_type 的别名。

[编辑] 注释

erased_type 在 LFTS v3 中被移除,因为 std::pmr::polymorphic_allocator<> 对于类型擦除是更优的选择。