VS2022
typedef struct
{
shared_mutex st_Locker;
}MODULESESSION;
class CModuleClient
{
public:
CModuleClient();
~CModuleClient();
public:
BOOL ModuleCreate(int xhClient)
{
MODULESESSION st_Module;
stl_MapClient.insert(make_pair(xhClient, st_Module)); //编译报错,除非结构体使用 shared_ptr<shared_mutex> st_Locker;才编译成功,这是为什么啊?
return TRUE;
}
protected:
private:
unordered_map<int, MODULESESSION> stl_MapClient;
};