can recursive functions be inline functions?
-
can recursive functions be inline functions?
-
can recursive functions be inline functions?
The compiler might not know the number of recursions that can happen during compile time. Neither can it decide it by itself. That information will be available at runtime only. So the compiler will *not* be able to generate the inline code at compile time. Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.
-
can recursive functions be inline functions?
inline
is only a suggestion to the compiler. There are things you can do in code which will result in a "vanilla" function even though it's markedinline
, such as taking its address. Another common one is recursive functions. Steve -
The compiler might not know the number of recursions that can happen during compile time. Neither can it decide it by itself. That information will be available at runtime only. So the compiler will *not* be able to generate the inline code at compile time. Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.
yeah!.....exactly what i had in mind.....but if somehow if it could,it did be more efficient!.....it seemz recursive functions are slightly slower than functions that are iterated..... thatz when i thought of inline..... anywayz!.....thanx for the reply cheerz!
-
yeah!.....exactly what i had in mind.....but if somehow if it could,it did be more efficient!.....it seemz recursive functions are slightly slower than functions that are iterated..... thatz when i thought of inline..... anywayz!.....thanx for the reply cheerz!
You're welcome Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.