Is a static member function defined inside a class implicitly inlined?

Viewed 920

As far as I know, every non-static member function defined inside a class is implicitly inlined. Now I am wondering if the same is valid for static member functions, considering that I can define the function multiple times in different translation units.

As an example:

class Foo {

public:

    static void static_f(void) { std::cout << static_data << std::endl; } //Is it inline?
    static void static_f2(void); //I guess it isn't

private:

    static int static_data;
    int non_static_data;
};

PS: In this document (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3690.pdf) I found this lines:

9.4.1 Static member functions [class.static.mfct] 1 [ Note: The rules described in 9.3 apply to static member functions. — end note ]

and previously in Section 9.3:

A member function may be defined (8.4) in its class definition, in which case it is an inline member function (7.1.2) [...]

1 Answers
Related