Suppose I have a very simple function that I expect the compiler to inline it. But I may need to throw exception on seeing some invalid input, would that stop the compiler from
It is perfectly reasonable and valid for a compiler to inline a function that throws.