I have the following class defined in a foo.h
header file
class Foo {
public:
inline int Method();
};
inline int Foo::Method() { // Implementation }
I would like now to move the implementation to a foo.cpp
file. To this end, I have to remove the inline
keyword and move the implementation of the method to a foo.cpp
file like this
#include `foo.h`
inline int Foo::Method() { // Implementation }
I have two questions:
- Is my statement about the removal of the
inline
keyword correct? Should it be necessarily removed? - How typically the removal of the
inline
keyword affect the performance (practically all my methods are inlined)?
Thank you very much in advance.
See Question&Answers more detail:os