vendredi 1 janvier 2016

Does the standard specify which functions are declared inline?

So the question is, does the latest standard specify when a function in the standard C++ library is declared inline or not?

Looking at the algorithm header file from the Clang, GCC and MSVC implementations, every single function, except for the ones which are constexpr, are declared inline.

I was gonna go on and ask about when to inline and what not, but I don't wanna have the usual argument about how the compiler knows better or micro optimizations, so I probably shouldn't even let this sentence stay in the question. Oh wait...

Aucun commentaire:

Enregistrer un commentaire