======== case 1 ======== MyClass::fun() is treated as inline funcion in both test70.cpp and test70a.cpp -------------------- // test70.cpp // cl /Ob1 /Fatest70.asm test70.cpp test70a.obj #include "test70a.h" void main() { MyClass obj; obj.fun(10); // inline expanded } -------------------- // test70a.h class MyClass { public: inline void fun(int x); // at least one has specified inline void fun2(); }; inline void MyClass::fun(int x) // at least one has specified inline { x = x + 1; } -------------------- // test70a.cpp // cl /Ob1 /Fatest70a.asm /c test70a.cpp #include "test70a.h" void MyClass::fun2() { fun(10); // inline expanded } ======== case 2 ======== MyClass::fun() is treated as a regular funcion in test70.cpp and as a inline expanded function in test70a.cpp in the link stage, fun() referenced in test70.cpp will be missing -------------------- // test70.cpp // cl /Ob1 /Fatest70.asm test70.cpp test70a.obj #include "test70a.h" void main() { MyClass obj; obj.fun(10); // fun() is treated as a function call } -------------------- // test70a.h class MyClass { public: inline void fun(int x); // at least one has specified inline void fun2(); }; -------------------- // test70a.cpp // cl /Ob1 /Fatest70a.asm /c test70a.cpp #include "test70a.h" void MyClass::fun(int x) { x = x + 1; } void MyClass::fun2() { fun(10); // fun() is inline expanded } ======== case 3 ======== MyClass::fun() is treated as a regular funcion in test70.cpp and as a inline expanded function in test70a.cpp in the link stage, fun() referenced in test70.cpp will be missing -------------------- // test70.cpp // cl /Ob1 /Fatest70.asm test70.cpp test70a.obj #include "test70a.h" void main() { MyClass obj; obj.fun(10); // fun() is treated as a function call } -------------------- // test70a.h class MyClass { public: void fun(int x); // at least one has specified inline void fun2(); }; -------------------- // test70a.cpp // cl /Ob1 /Fatest70a.asm /c test70a.cpp #include "test70a.h" inline void MyClass::fun(int x) { x = x + 1; } void MyClass::fun2() { fun(10); // fun() is inline expanded }