Skip to content

C++ header only library implements a thread-safe singleton class using CRTP

License

Notifications You must be signed in to change notification settings

mmarkeloff/cpp-crtp-singleton

Repository files navigation

Build Status

cpp-crtp-singleton

C++ header only library implements a thread-safe singleton class using CRTP.

Usage

#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;
}

Examples

See sample project for more complete usage examples.

Documentation

See automatic generated docs for more information.

About

C++ header only library implements a thread-safe singleton class using CRTP

Resources

License

Stars

Watchers

Forks

Packages

No packages published