Talk:cpp/language/requires
From cppreference.com
In the section on Compound Requirements, it would not hurt to include an explanation of how the type-constraint is used, e.g. that {expression} -> std::same_as<U> substitutes the return-type of the expression into the first template param of std::same_as<T,U> 82.134.169.160 13:27, 6 November 2022 (PST)søren nissen
- It does, doesn't it? "
std::same_as<decltype((x + 1)), int> must be satisfied" --Ybab321 (talk) 03:01, 7 November 2022 (PST)- I completely missed that - probably because I was looking in the description and not in the example (and thus also not in the comments in the example)82.134.169.160 03:52, 15 November 2022 (PST)Søren Nissen
The Swappable concept example is poorly chosen, as std::swap is not visible from the current scope (and therefore won't be found for fundamental types that don't have an associated namespace). --.oisyn (talk) 14:41, 9 February 2023 (PST)