#include using namespace std; class Singleton { Singleton() {} public: // Copy construction and assignment is disabled; Singleton(Singleton &other) = delete; void operator=(const Singleton &) = delete; static Singleton& get_instance() { static Singleton s; return s; } void f() { cout << "Singleton::f()" << endl; } }; int main() { Singleton::get_instance().f(); }