std::experi...ranges::Same(3)
π std::experi...ranges::Same(3) π
hii bestie! welcome to the manual page for std::experi...ranges::Same(3), straight outta the C++ Standard Libary (their spelling, not mine π). itβs giving βtiny concept, big constraint-checking energyβ and weβre gonna read it together, okay? π«Ά
β¨ NAME β¨
std::experimental::ranges::Same β std::experimental::ranges::Same. yes bestie, the name is the name, and itβs absolutely serving recursive icon behavior π
.
πΈ Synopsis πΈ
Defined in header <experimental/ranges/concepts>:
template< class T, class U > (ranges
TS)
concept bool Same = std::is_same<T, U>::value; // see below
The concept Same<T, U> is satisfied if and only if T and U denote the same type. periodt. β¨
Despite being specified using it, there need not be any subsumption relationship between Same<T, U> and std::is_same<T, U>::value. like, do not assume that subsumption link is there, no cap.
For the purposes of constraint checking, Same<T, U> implies Same<U, T>. flip it and reverse it, but only for constraint checking, iykyk π₯.
π Notes π
The additional requirement on constraint checking differentiates Same from std::is_same. thatβs the whole extra lilβ sparkle β¨.
π¦ See also π¦
is_sameβ checks if two types are the same (C++11) (class template). bestie wanted the class template version, so here it is π.
mwah π this page came from http://cppreference.com, dated 2024.06.10, and itβs the std::experi...ranges::Same(3) manual page. bye bestie, go check those constraints π«Άπ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms