I have a class
class foo { public: foo(); foo( int ); private: static const string s; };
Where is the best place to initialize the
Since C++17 the inline specifier also applies to variables. You can now define static member variables in the class definition:
#include class foo { public: foo(); foo( int ); private: inline static const std::string s { "foo" }; };