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]

C++ PATCH for c++/80767, unnecessary instantiation of generic lambda


In this testcase, when we try to call the object of 'overloader' type,
we consider the conversion function from the first lambda to void
(*)(a) and build up a surrogate call function for it.  We consider how
to convert from overloader to that type, which means also looking at
the template conversion function from the second lambda, which
involves instantiating the operator() to determine the return type,
which is ill-formed.

But the standard seems to say that we shouldn't bother to consider how
to do that conversion unless we actually choose the surrogate call
function for that type, so that's what this patch implemenets.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: 80767.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]