Original Post
Any function that has it's complete definition in the class is "automatically inlined." What about this? Would the compiler inline this? Example.h Example.cpp
class Example
{
private:
int number;
public:
Example(int num) : number(num)
{ } //This is automatically inlined
inline int GetNumber();
};
#include "Example.h"
inline int GetNumber()
{
return number;
}