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 8274175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:39:26+00:00 2026-06-08T07:39:26+00:00

So I have this vector: vector<boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool> > wait; And I want

  • 0

So I have this vector:

  vector<boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool> > wait;

And I want to search if for the ones that have true in them, how can I do that, that’s it.

Any suggestion I have looked into boost::phoenix but not really sure how it works, any ideas.

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-06-08T07:39:27+00:00Added an answer on June 8, 2026 at 7:39 am

    Since you are just starting off, here is some example code (I don’t what compiler you are using, but you could use auto, range-based for etc. if you have C++11 support):

    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<3>(*i) == true)
        {
           // This tuple has true in it, so do something
        }
    }
    

    C++11 version:

    for (auto& i : wait)
    {
        if (boost::get<3>(i) == true)
        {
            // Do stuff
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a vector code in c++ this: typedef vector<boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool> >::iterator
I have a vector in R that looks like this: dat <- c(TRUE, TRUE,
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*,
I have the vector d<-1:100 I want to sample k=3 times from this vector
I have a large nested vector that look like this: import Data.Vector let x
Say I have a vector: (def data [Hello World Test This]) And I want
I have a vector, v3, that looks like this: v3 <- matrix(c(1,1,3,3,2,2, 2,3,1,2,3,1, 3,2,2,1,1,3),
EDIT: Solved, my mistake; explained in my answer. I have this: std::vector < boost::shared_ptr
I have this simple piece of code that uses boost::bind: #include <boost/bind.hpp> #include <utility>
I have a huge vector of boost dynamic_bitset . I want to write the

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.