title: Can a recursive function be inline?
body: <pre><code>inline int factorial(int n)
  {
      if(!n) return 1;
      else return n*factorial(n-1);
  }
  </code></pre>
  
  <p>As I was reading <a href="https://rads.stackoverflow.com/amzn/click/com/0201543303" rel="noreferrer" rel="nofollow noreferrer">this</a>, found that the above code would lead to "infinite compilation" if not handled by compiler correctly.</p>
  
  <p>How does the compiler decide whether to inline a function or not ?</p>