PR c++/87480 - decltype of member access in default template arg
The issue here is that declval<T>().d is considered instantiation-dependent
within a template, as the access to 'd' might depend on the particular
specialization. But when we're deducing template arguments for a call, we
know that the call and the arguments are non-dependent, so we can do the
substitution as though we aren't in a template. Which strictly speaking we
aren't, since the default argument is considered a separate definition.
* pt.c (type_unification_real): Accept a dependent result in
template context.
From-SVN: r269826