Which algorithm or combine of algorithms can use for following situation?
struct Term
{
int ix;
double f;
};
std::vector<Term> terms = <intitalize terms>;
std::vector< int > termIxVector;
// NEED get all `ix` from the `terms` where term.f < 1.0,
// and insert 'ix' result to termIxVector.
//i.e. equavalent this loop:
for(std::size_t i = 0; i < terms.size(); ++i)
if ( terms[i].f < 1.0 )
termIxVector.push_back(terms[i].ix);
std::copy_if copies only Term structure. std::transform - doesn't support predicate.