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

  • SEARCH
  • Home
  • 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 8247083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:43:26+00:00 2026-06-07T22:43:26+00:00

I have this code: if (((boost::get< 1>(*i)) == node1) || ((boost::get< 2>(i*)) == node2))

  • 0

I have this code:

 if (((boost::get< 1>(*i)) == node1) || ((boost::get< 2>(i*)) == node2))
    {
        cout << "on this tuple "<< boost::get<1>(*i) << "we found it" << endl;

    }

And is giving me this error, any idea what is it talking about:

 main.cpp:172: error: expected primary-expression before ‘)’ token

This is to check a vector of tuples to know which has the value, like so:

  void threaded_function(Model_factory &mf, ppa::Node *root)
{
  boost::mutex::scoped_lock lock(result_mutex);   
  if(!running_jobs.empty())
  {
    boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool>  tuple = running_jobs.front();
    cout << "getting the lock for " << running_jobs.front() << " on " 
            << lock.owns_lock() << endl;
    running_jobs.pop();

    lock.unlock();
    ppa::Node *n = boost::get<0>(tuple);
    ppa::Node *n1 = boost::get<1>(tuple);
    ppa::Node *n2 = boost::get<2>(tuple);
    bool check = boost::get<3>(tuple);
   // n2->start_alignment_new(&mf);
    //n1->start_alignment_new(&mf);
     cout << " name " << n->get_name() << " has seq" << n->node_has_sequence_object<< " " << n->left_child->get_distance_to_parent()
             << " " << n->right_child->get_distance_to_parent() << " this done = " << check << endl;    
    n->start_alignment_new(&mf);



  cout << " name " << n->get_name() << " has seq " << n->node_has_sequence_object<< " " << " lock " << lock.owns_lock() << endl; 


  boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool>  tuple2 = wait.front();
 ppa::Node *node = boost::get<0>(tuple2);
    ppa::Node *node1 = boost::get<1>(tuple2);
    ppa::Node *node2 = boost::get<2>(tuple2);
    bool check2 = boost::get<3>(tuple);

     typedef vector<boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool> >::iterator vec_iter;

    for (vec_iter i = wait.begin(); i != wait.end(); ++i)
    {
    if (((boost::get< 1>(*i)) == node1) || ((boost::get< 2>(i*)) == node2))
    {
        cout << "on this tuple "<< boost::get<1>(*i) << "we found it" << endl;

    }
    else 
    {
        cout << "false found" << endl;
    }
    }

  }
  • 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-06-07T22:43:29+00:00Added an answer on June 7, 2026 at 10:43 pm

    You typed i* instead of *i in your second condition:

    if (((boost::get< 1>(*i)) == node1) || ((boost::get< 2>(i*)) == node2)) 
                                                           ^^^^
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code which is giving the error: error this boost::lock_error error this
I'm using boost::asio, and I have code like this: void CServer::Start(int port) { tcp::acceptor
I have this code: ie1.link(:text, /Exception:/) It is producing an error message which I
If I have user defined exceptions in my code, I can't get Boost test
I'm trying to create something similar as this code found at the boost.asio examples.
I have this code: void threaded_function(Model_factory &mf, ppa::Node *root) { boost::mutex::scoped_lock lock(result_mutex); typedef vector<boost::tuple<ppa::Node*,
m_io_service.post(boost::ref(i)); I have this call in a section of code, the underlying type i
I have this example code: #include template<class T> class Class { public: typedef boost::shared_ptr<Class<T>
I have a snippet of code like this: std::list<boost::shared_ptr<Point> > left, right; // ...
I have this code <div id=main style=background:#aaaaaa;float:left;height:160px;margin:5px;position:relative;display:block;width:630px;> <div id=1 class=item style=background:#ffaacc;float:left;width:200px;height:150px;margin:5px;position:absolute;left:0px;top:0px;> </div> <div id=2

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.