Are there any compilers that IGNORE C++ standard about default inline functions?

前端 未结 5 615
忘了有多久
忘了有多久 2021-01-25 08:17

C++ ISO standard says, that:

\"A function defined within a class definition is an inline function.\"

Are there any compilers that IGNORE th

5条回答
  •  情话喂你
    2021-01-25 09:01

    The standard says that all compilers can ignore inline requests, whether implicit or explicit. Whether or not they do so will nornally depend on whether the function can practically be inlined - for example recursive functions cannot be.

    Edit: Just to clarify - the questioner is ignoring this, from the previous para in the standard to that he quoted from:

    An implementation is not required to perform this inline substitution at the point of call

提交回复
热议问题