News for hackers. Stuff that matters.
Re:How C++ Resolves a Function Call by masterofmisc on Tuesday March 16, 2021 @03:44AM (#26474006)
Huh... So your saying "right click -> jump to declaration" uses the compiler to resolve all the candidate functions to determine the function that would of been chosen at compile time? ..and then take you to that function? I thought it just took you to the 1st occurrence of the function it found. If so, that's interesting.
Re:How C++ Resolves a Function Call by MauranKilom on Tuesday March 16, 2021 @06:27AM (#26474949)
Really depends on your IDE. As an example, Visual Studio ships Microsoft's CPP compiler (MSVC [0]), but uses a completely different compiler frontend (namely EDG [1]) for IntelliSense.

In a way, it does use a compiler to resolve the candidate functions, but it doesn't go through all the compilation stages. And it's not even the same compiler as when you hit compile :)

[0]: https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B

[1]: https://www.edg.com/

Re:How C++ Resolves a Function Call by masterofmisc on Tuesday March 16, 2021 @08:46AM (#26475984)
Ahh that's interesting to know. Thanks for the info.