Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synchronized_value documentation example fails to compile #374

Open
Jacob-Burckhardt opened this issue Jul 15, 2022 · 0 comments
Open

synchronized_value documentation example fails to compile #374

Jacob-Burckhardt opened this issue Jul 15, 2022 · 0 comments

Comments

@Jacob-Burckhardt
Copy link

The documentation gives the following example. u1 and u2 appear to be variable names, yet they appear to be undeclared.

  synchronized_value<std::queue<MessageType> > q1,q2;
  void transferMessage()
  {
    auto lks = synchronize(u1,u2); // dead-lock free algorithm

    if(!std::get<1>(lks)->empty())
    {
      std::get<2>(lks)->push_back(u1->front());
      std::get<1>(lks)->pop_front();
    }
  }
  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant