[Issue 4172] Improve varargs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 2 05:53:59 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4172



--- Comment #15 from Fawzi Mohamed <fawzi at gmx.ch> 2010-12-02 05:51:36 PST ---
To keep backward compatibility and a working D1 compiler at least for D1, if
marshalling is too difficult with the current compiler I would evaluate the
effort of creating a hidden variadic template function for each variadic
function, that (using a tuple) would pass the stuff following the old
convention to the real variadic function defined as taking void*,TypeInfo[].
Then at each calling point after the overload resolution, if the match is for
the variadic function one would call the corresponding variadic template
function.

As the differences between variadic functions and template functions are just
small overloading differences (maybe not any more in D2, I did not check the
details), and the possibility to override variadic functions, and those would
still work correctly, with such an approach one can keep D1 working also on 64
bit architectures.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list