>>>>> "Lawrence" == Lawrence Crowl <cr...@googlers.com> writes:

Lawrence> My model is that I should be able to cut and paste an expression
Lawrence> from the source to the debugger and have it work.  I concede that
Lawrence> C++ function overload resolution is a hard problem.  However, gdb
Lawrence> has a slightly easier task in that it won't be doing instantiation
Lawrence> (as that expression has already instantiated everything it needs)
Lawrence> and so it need only pick among what exists.

Yeah, what isn't clear to me is that even this can be done in a
behavior-preserving way, at least short of having full source available
and the entire compiler in the debugger.

I'd be very pleased to be wrong, but my current understanding is that
one can play arbitrary games with SFINAE to come up with code that
defeats any less complete solution.

Sergio is going to look at this area again.  So if you know differently,
it would be great to have your input.

I can dig up the current ("pending" -- but really unreviewed for a few
years for the above reasons) gdb patch if you are interested.  I believe
it worked by applying overload-resolution-like rules to templates
(though it has been a while).

Tom

Reply via email to