boost mutex strange error with private member

后端 未结 2 5016
青春惊慌失措
青春惊慌失措 2021-02-20 19:18

I have a strange error.

class INST
{
public:
boost::mutex m_mutex;
};

std::vector m_inst;

error C2248: \'boost::mutex::mutex\' :

2条回答
  •  不要未来只要你来
    2021-02-20 19:32

    mutexes can't be copied, so you can't place them in a container which would copy the mutex. The error is likely referring to the private copy constructor of the mutex.

提交回复
热议问题