|C++ templates and overloading email@example.com (Ugo) (2000-05-01)|
|Re: C++ templates and overloading firstname.lastname@example.org (Robert A Duff) (2000-05-04)|
|Re: C++ templates and overloading email@example.com (2000-05-08)|
|Date:||1 May 2000 13:20:26 -0400|
|Keywords:||C++, question, comment|
I'm designing a compiler for a proper subset of C++ which includes
- function templates
- overloading of functions
I'm looking for some resources which talks about this problem, i.e.
polymorphism/overloading in IMPERATIVE languages.
[I talk a little bit about overloading in "Linkers and Loaders".
Basically, in an overloaded function the types of the arguments and
possibly of the result become part of the true name of the function.
C++ compilers "mangle" the type info into a long text name passed to
the linker. Templates are basically macros, you macro expand them
when you come across an instance. The tricky part is garbage
collecting all of the redundant expanded copies in separately compiled
modules, or arranging not to expand redundantly in the first place.
Return to the
Search the comp.compilers archives again.