+ 1
Is it possible to have a recursive inline function ???
5 Respuestas
+ 2
the keyword inline is a suggestion for the compiler to inline your function so on paper or in code it is possible but the compiled code will mostlikly not be inlined or at least not endlessly
0
basically it is practically not possible to have inline function....
am i right @chrizzhigh
0
yes if i understood you correctly ^^
0
no, inline function can't be recursive.
0
try it, it can but the compiler decieds how many levels it will inlines.
#include <iostream>
using namespace std;
inline void call(int i) {
if(i < 5) { call(i+1); }
cout << i <<". hello" << endl;
}
int main() {
call(0);
return 0;
}