Uploaded September 2024 | Updated December 2026, 3 hours ago
cppnow.org
---
C++ Overload Inspector - A Tool for Analyzing and Profiling Overloaded Function Calls - Botond Istvan Horvath - C++Now 2024
---
Overloading in C++ is a well known technique for compile-time polymorphism. Overloaded functions and operators are commonly used especially in templated environments. Despite of the clear wording of the standard overloading’s behavior can surprise even the experienced C++ programmers. When the compiler picks up the unexpected function declaration or the overload deduction fails the programmer has a hard time to deduce the root cause.
Despite its frequent usage there aren’t many tools for helping programmers to write and analyze overloaded function-calls.
I’ve developed an overload inspector (and profiler) tool based on the open source LLVM/Clang compiler. With this tool we can list the possible overload candidates for a certain function call, and we get a step by step explanation how and why certain candidates were eliminated. If we have an ambiguous overload resolution we can see the reason of the ambiguity aka why aren’t one overload better then the other, thus helping the user to resolve the ambiguity.
This tool also measures the time of the overload resolution process thus helping library implementers to carefully design their interface to optimize compilation time.
The tool is open source and publicly accessible for tests.
The presentation will overview the fundamental overloading rules, and demonstrates tricky examples. Then we explain the usage of the tool by non-trivial examples. We also show the profiling functionality.
---
Slides: github.com/boostcon/cppnow_presentations_2024/blob/main/Presentations/cpp_overload_inspector.pdf
---
Botond Istvan Horvath
I’ve been studying and using C++ for more than 5 years. I’m an MSC student at ELTE- Eötvös Loránd University while also working at Ericsson Telecommunication Technologies R&D in a team aimed for developing tools for code analyzing.
My consultants are Zoltán Porkoláb and Richárd Szalay.
---
C++Now 2025 - 28th April - 2nd May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#boost #cpp #cppprogramming #cplusplus #cplusplusprogramming
cppnow.org
---
C++ Overload Inspector - A Tool for Analyzing and Profiling Overloaded Function Calls - Botond Istvan Horvath - C++Now 2024
---
Overloading in C++ is a well known technique for compile-time polymorphism. Overloaded functions and operators are commonly used especially in templated environments. Despite of the clear wording of the standard overloading’s behavior can surprise even the experienced C++ programmers. When the compiler picks up the unexpected function declaration or the overload deduction fails the programmer has a hard time to deduce the root cause.
Despite its frequent usage there aren’t many tools for helping programmers to write and analyze overloaded function-calls.
I’ve developed an overload inspector (and profiler) tool based on the open source LLVM/Clang compiler. With this tool we can list the possible overload candidates for a certain function call, and we get a step by step explanation how and why certain candidates were eliminated. If we have an ambiguous overload resolution we can see the reason of the ambiguity aka why aren’t one overload better then the other, thus helping the user to resolve the ambiguity.
This tool also measures the time of the overload resolution process thus helping library implementers to carefully design their interface to optimize compilation time.
The tool is open source and publicly accessible for tests.
The presentation will overview the fundamental overloading rules, and demonstrates tricky examples. Then we explain the usage of the tool by non-trivial examples. We also show the profiling functionality.
---
Slides: github.com/boostcon/cppnow_presentations_2024/blob/main/Presentations/cpp_overload_inspector.pdf
---
Botond Istvan Horvath
I’ve been studying and using C++ for more than 5 years. I’m an MSC student at ELTE- Eötvös Loránd University while also working at Ericsson Telecommunication Technologies R&D in a team aimed for developing tools for code analyzing.
My consultants are Zoltán Porkoláb and Richárd Szalay.
---
C++Now 2025 - 28th April - 2nd May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#boost #cpp #cppprogramming #cplusplus #cplusplusprogramming










