+ 4

Can inline function be recursive?

Can we call the same inline function inside inline function's body?

11th Nov 2017, 6:25 PM
Mahima Rajvir Singh
Mahima Rajvir Singh - avatar
3 Answers
+ 2
You can mark it inline but the compiler isn't going to inline recursive calls, there's no way for it to predict how many recursive calls it will need to inline
11th Nov 2017, 7:17 PM
aklex
aklex - avatar
0
If it's named probably otherwise no
11th Nov 2017, 6:26 PM
Marcus SĂžndergaard
Marcus SĂžndergaard - avatar