This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, Dec 14, 2009 at 01:08:08PM -0500, Jason Merrill wrote:On 12/14/2009 12:31 PM, Dodji Seketeli wrote: the code that looks for a conversion from A to something* should complain about choosing a template.
I first tried to make lookup_conversions not return any template conversion operator when called from within add_builtin_candidates. That was breaking things because sometimes the template conversion op can be properly instantiated. In thoses cases we need to consider that that conversion op.
I then tried in the patch below to avoid considering the operator '*' as a built-in candidate when it's operand has a dependent type. Having a built-in operator operand with dependent type would otherwise mean that we picked up a template conversion operator that couldn't be properly instantiated and was thus converting - after being instantiated by add_template_candidate, called by build_user_type_conversion_1 - to a dependent type.
if (TYPE_PTR_P (type1) && null_ptr_cst_p (args[1]) && !uses_template_parms (type1))
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |