Original Post
Hello people.
I know that is inpossible to take advance of inline routines in a DLL if they are to be exproted. But what about static libraries? Will they take advance with inlines functions?
Another question: I want to make several inline functions using the FPU....but not every one have one of this. The solution? Test. If there is support for that kind of instructions, use them, otherwise use the math lib. To avoid allways cheking if there is suport or not (some kind of if(FPUsupport){}else{}) I was thinking on doing this some kind of thing:
(this code was writed right here)
void FPUFunction(); //FPU featured
void NormalFunction(); //no FPU featured
typedef void(*function)();
function table[1];
void Inicialize(){
checkForFPU();
if(FPU)
table[0] = FPUFunction;
else
table[0] = NormalFunction;
void Function(){
table[0]();
}
Now, when I whant to use the Function, it knows what instructions to use without the comparing. BUT, this means 2 functions calls and no inline! Does anybody have an ideia how to do the same but using inline?
Thanks in advance