ARTICLE AD BOX
Respected users, When a template function is called then during template argument deduction and substitution (which happens before overload resolution) of function template, do function parameter which are class template specialization get implicitly instantiated ?
Consider example code :
template<typename T> struct foo{ using foo_type = int; } ; template<typename T> struct boo { using boo_type = typename T::foo_type; } ; template <typename T > void someFunc(boo<T>) {} template <typename T > typename T::boo_type someFunc(T) {}So if I were to call such function someFunc(boo<foo<int>>()); , which of the following event can lead to such implicit instantiation?
During template argument deduction (but it's just pattern matching between parameter type and argument type according to answers on SO, right?)
During template argument substitution?. I think second overload will always require complete definition of boo<T> due to return type, then the implicit instantiation of the parameter boo<T> of first overload someFunc(boo<T>) will be done at this point for checking invalid type and expression? or no definition and implicit instantiation is needed at this point??
or only after overload resolution is done and candidate function is selected, implicit instantiation of class specialization boo<T> of first overload someFunc will be done?
Regards
