Summary
This episode explores the differences between function overloading in C and C++. Jason demonstrates how C++ naturally supports function overloading through name mangling in the symbol table, while traditional C doesn't allow multiple functions with the same name. He shows how C traditionally handled this limitation by using distinct function names (like area, areaF, areaL) and then introduces C11's _Generic keyword, which provides a preprocessor-based approach to function overloading. The episode concludes by contrasting this with C++'s more elegant template-based solution.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[diff.cpp03.expr]60% match -
[diff.dcl]60% match -
[diff.cpp11.expr]60% match -
[diff.cpp14.expr]60% match -
[diff.cpp03.lex]59% match -
[diff.class]59% match -
[diff.cpp03]59% match -
[diff.iso]53% match