Hacker News new | ask | show | jobs
by kccqzy 1768 days ago
This almost doesn't happen when your tools are good. At Google the Kythe tool (https://kythe.io) gracefully deals with templates, macros, and much more. Both "go to definition" and "find references" just work with 99.9% of C++ code, including within complicated macros and templates.

(The one and only case I've ever found it doesn't work is to find references to a function that's only called via ADL in a widely used template that's instantiated with thousands of different types.)

1 comments

What about SFINAE?
Works. Because it uses the compiler to figure out what calls what, and so the compiler has already selected the right overload.