While C++'s function overload resolution is perplex, Jeff Preshing had a way to explain it in one GIF.
Although there are sophisticated details (e.g. ADL, pointer to function;pointer to member function etc.) which should be known by seasoned C++ engineers, the GIF provides a quick look-up for code that hits ambiguous resolution state.
Reference:
https://preshing.com/20210315/how-cpp-resolves-a-function-call/
credit: Jeff Preshing
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.