C++ concepts placeholder type deduction
In the Ranges spec N4622 the Same concept is defined to take two types T and U , but is sometimes used inside requires with just one like: { t } -> Same<T>; What's the rule that enables the deduction for the 2nd type U ? (e.g. from the Concepts spec N4630 ) The simplest similar example would be: template <class T, class U> concept bool C = (sizeof(T) == sizeof(U)) && (sizeof(U) != 1); template <class T> concept bool D = requires(T t){ // How is U deduced here? {t} -> C<T>; }; template <class T> requires D<T> void fn() {} int main() { // Fails with: unable to deduce placeholder type 'C<char>'