mercredi 22 avril 2015

Is there Still a Use for inline?

I believed, inline was obsolete because I read here:

No matter how you designate a function as inline, it is a request that the compiler is allowed to ignore: the compiler might inline-expand some, all, or none of the places where you call a function designated as inline.

However, Angew seems to understand something I don't. In this question he and I go back and forth quite a bit, on whether inline is still useful.

I have seen several questions on StackOverflow about what the use of inline is. I understand what the inline keyword was supposed to accomplish and the advantages of inline functions. What I want to know is: With the compiler able to inline at will, where can inline be used to force, not suggest, a change in compiled code?

Aucun commentaire:

Enregistrer un commentaire