MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / singleton

Class singleton

3rdparty/asyncplusplus/src/singleton.h:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26// C++11 guarantees thread safety for static initialization
27template<typename T>
28class singleton {
29public:
30 static T& get_instance()
31 {
32 static T instance;
33 return instance;
34 }
35};
36#else
37// Some compilers don't support thread-safe static initialization, so emulate it
38template<typename T>

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected