命名空间
变体
操作

std::uses_allocator<std::experimental::promise>

来自 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/future>
template< class R, class Alloc >

struct uses_allocator<std::experimental::promise<R>, Alloc>

    : std::true_type {};
(库基础 TS)

std::uses_allocator 的特化告知其他库组件,std::experimental::promise 类型的所有对象都支持uses-allocator 构造

目录

继承自 std::integral_constant

成员常量

value
[静态]
true
(公有静态成员常量)

成员函数

operator bool
将对象转换为 bool,返回 value
(公有成员函数)
operator()
(C++14)
返回 value
(公有成员函数)

成员类型

类型 定义
value_type bool
type std::integral_constant<bool, value>

[编辑] 参见

检查指定类型是否支持 uses-allocator 构造
(类模板) [编辑]