Since C++17, we can declare any static member "inline", even if it is not const:
class Foo
{
static inline std::vector<int>;
};
Of course, the standard doesn't say much on the effect on the process of compilation. So I was wondering, in terms of just how the program is compiled, does "inline static" have any downsides VS defining it separately (most of the time inside the .cpp)? Or is it just safe to replace any and all static-variables with the inline-variant?
The one difference I can see is that having the definition in the cpp allows me to change the default-value w/o recompiling all dependencies of the header; but I rarely assign a non-default value to static members.