Is “inline” implicit in C++ member functions defined in class definition

The C++ ISO standard says:

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

But, this doesn’t mean the function will necessarily be inlined: generally nowadays, it appears that the compiler will decide if inlining the function will lead to any benefits.

Leave a Comment