While it would be very convenient to use inline functions at some situations,
Are there any drawbacks with inline functions?
Conclusion:
I agree with the other posts:
A third point is it may force you to expose implementation details in your headers, .e.g.,
class OtherObject;
class Object {
public:
void someFunc(OtherObject& otherObj) {
otherObj.doIt(); // Yikes requires OtherObj declaration!
}
};
Without the inline a forward declaration of OtherObject was all you needed. With the inline your header needs the definition for OtherObject.