命名空间
变体
操作

std::experimental::ranges::Same

来自 cppreference.cn
< cpp‎ | experimental‎ | ranges
 
 
实验性
技术规范
文件系统库 (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 图形
 
 
概念库
核心语言概念
                              
对象概念
                              
                              
比较概念
可调用概念
                                        
                              
URNG 概念
 
template< class T, class U >
concept bool Same = std::is_same<T, U>::value; // see below
(ranges TS)

概念 Same<T, U> 当且仅当 TU 表示同一类型时满足。

尽管使用它来指定,但 Same<T, U>std::is_same<T, U>::value 之间不必存在任何 subsumption 关系。

为了约束检查的目的,Same<T, U> 意味着 Same<U, T>

[编辑] 注解

约束检查的附加要求将 Samestd::is_same 区分开来。

[编辑] 参见

(C++11)
检查两个类型是否相同
(类模板) [编辑]