It is a best practice in the public part of a class body, to describe only information relevant for reusers of this class, without implementation
details like inline
specifier.
For inline member function defined outside of the class body, this rule verifies that inline
is set on the definition and not on the
declaration of the function.
Noncompliant code example
class Foo {
public:
inline void method(); // Noncompliant
// ...
};
void Foo::method() {
// ...
}
Compliant solution
class Foo {
public:
void method();
// ...
};
inline void Foo::method() {
// ...
}