On Tue, 28 Nov 2006 16:19:40 +0100 in comp.lang.c++, "Henrik Goldman"
<> wrote,
>Due to compatibility with C the function f1 needs to be with C declaration
>and for this reason I cannot use function overloading with different
>parameters depending on the input type.
Overloading of functions in this situation gets you nothing more than
cleaner notation. The same thing can be accomplished with C
compatibility with a set of functions named
f1_int(int);
f1_double(double);
etc. This is basically what some C++ compilers do to implement
overloaded functions anyway, with "name mangling" for the linker.
|