C++ header only library implements a thread-safe singleton class using CRTP.
#include <crtp_st.hpp>
class Derived : public crtp_st::Base<Derived> {
public:
void impl() { }
};
int main(int argc, char* argv[]) {
Derived::instance().impl();
return 0;
}
See sample project for more complete usage examples.
See automatic generated docs for more information.