On the richness of C++

Walter Bright newshound1 at digitalmars.com
Wed Apr 16 10:50:24 PDT 2008


Sean Kelly wrote:
> Sure, but templates don't suit every situation.  It's not uncommon for
> APIs to have to overload on accepting a function and a delegate for
> flexibility.

The only way to merge function pointers with delegates is to have the 
compiler generate trampolines. This isn't very runtime efficient - the 
template approach will be faster.



More information about the Digitalmars-d mailing list