Is it possible to make a native* generics?
* generic that implemented at run-time.
In C:Code:template<T> T add(T n1, T n2) {
return n1 + n2;
}
Is it true that C++ templates is compiled-time generic?Code:void *add(void *n1, void *n2) {
return *n1 + *n2; //This one will not work for sure
}
However Delphi offered generic feature since Delphi 2009, and I thought Delphi 2009 executable is native code. But it seems it already changed into bytecode one >_< How disappointing...
Thanks in advance.