Based on the idea of singleton mode, the UID generator is designed to be singleton and safe in multithreaded situation. Use smart pointers to ensure no memory leaks. Use std::set to ensure that the ID ...