Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7509563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:57:14+00:00 2026-05-29T22:57:14+00:00

I have a strange error. class INST { public: boost::mutex m_mutex; }; std::vector<INST> m_inst;

  • 0

I have a strange error.

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

std::vector<INST> m_inst;

error C2248: ‘boost::mutex::mutex’ : cannot access private member declared in class ‘boost::mutex’
see declaration of ‘boost::mutex::mutex’

However, my other class is fine,

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

VIEW m_view;

Am I missing something here? I have tried to declare m_mutex to private, but still have the same problem.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:57:16+00:00Added an answer on May 29, 2026 at 10:57 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So strange! Please have a look the code first: public class A {} public
I have encountered a strange error relating to template class in C++. The codes
I have an very strange error: when I want to use the SocialServer::Client class
I have a strange error with Hibernate3 here: Got a SoftwareDescription class, persisting it
When run this code, it gives me a strange error. I have a class
I have a strange error where my jquery ajax request doesn't submit all the
I am getting a strange error using jQuery 1.3.2 and Firefox. I have created
I have an application where every now and then I'm getting a strange error.
it is very strange, because this error doesn't happen all the time... I have
I have a strange error that has bothered me all day. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.