career_cup_18_3

Implement a singleton design pattern as a template such that, for any
given class Foo, you can call Singleton::instance() and get a pointer
to an instance of a singleton of type Foo Assume the existence of a
class Lock which has acquire() and release() methods How could you make
your implementation thread safe and exception safe?