A C++ template library for embedded applications
MIT licensed
Designed and
maintained by
John Wellbelove
Support the development
of the ETL

Singleton


Allows creation of a singleton

etl::singleton<typename T>
Derive from this to create the singleton.
T   The derived type.
____________________________________________________________________________________________________

Static functions


static T& get_instance()
Returns a reference to the one instance of T.
____________________________________________________________________________________________________

Example


class MySingleton : public etl::singleton<MySingleton>
{
};
singleton.h