- ranges[meta header]
- concept[meta id-type]
- cpp20[meta cpp]
template<class T, class U>
concept different-from = // 説明専用コンセプト
!same_as<remove_cvref_t<T>, remove_cvref_t<U>>;- same_as[link /reference/concepts/same_as.md]
- remove_cvref_t[link /reference/type_traits/remove_cvref.md]
different-fromは、型T、Uについてconst/volatile修飾を無視して、同じ型でないことを表す説明専用コンセプトである。
N4885 まではnot-same-asという名称だったが、実際にはsame_asの否定とは等価ではない(本説明専用コンセプトがconst/volatile修飾を無視していることによる)ため、N4892(C++23 のドラフトの1つ)からはdifferent-fromという現行の名称に変更された。
- C++20
- Clang: ??
- GCC: ??
- ICC: ??
- Visual C++: ??