std::experimental::ranges::Same
来自 cppreference.cn
< cpp | experimental | ranges
template< class T, class U > concept bool Same = std::is_same<T, U>::value; // see below |
(ranges TS) | |
概念 Same<T, U>
当且仅当 T
和 U
表示同一类型时满足。
尽管使用它来指定,但 Same<T, U> 和 std::is_same<T, U>::value 之间不必存在任何 subsumption 关系。
为了约束检查的目的,Same<T, U> 意味着 Same<U, T>。
[编辑] 注解
约束检查的附加要求将 Same
与 std::is_same 区分开来。
[编辑] 参见
(C++11) |
检查两个类型是否相同 (类模板) |