Would C++ exception stops function from being inlined?

后端 未结 3 2385
你的背包
你的背包 2021-02-19 19:34

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

3条回答
  •  醉话见心
    2021-02-19 20:11

    It is perfectly reasonable and valid for a compiler to inline a function that throws.

提交回复
热议问题