可变参数单例模板类
#include <memory>
#include <mutex>
#include <assert.h>
template<typename TYPE>
class Singleton{
public:
template<class... Args>
static TYPE *GetInstance(Args &&... args){
if (nullptr == pThis) {
static std::once_flag oneflag;
std::call_once(oneflag, [&]{
static TYPE instance(std::forward<Args