I have a class declaration in Utils.h:
class Utils {
private:
static boost::mutex outputMutex;
};
In the cpp file:
boost::mutex Utils::outputMutex = boost::mutex();
I get:
Error 1 error C2248: 'boost::mutex::mutex' : cannot access private member declared in class 'boost::mutex'
If we look inside boost/thread/win32/mutex.hpp
we see:
namespace boost
{
class mutex:
public ::boost::detail::underlying_mutex
{
// ...
public:
mutex()
{
initialize();
}
Does anyone know what I'm missing here? It used to compile OK on a different machine with VS2008.
Thank you.