3 ms·
It seems like in the second `foo`, the types of `a` and `b` are not hinged together. So to do it with the template syntax you actually need: template<typen
by kazinator 12y ago
It seems like in the second `foo`, the types of `a` and `b` are not hinged together. So to do it with the template syntax you actually need:
template<typename T, typename U>
void foo(T a, U b)
:)
- dllthomas 12y agoI intended the two to share a type. My point was that you cannot express that constraint with only auto.