$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: yinglcs2_at_[hidden]
Date: 2006-02-24 01:30:32
Hi,
I have the code which copy from a STL list to another
if a condition is met:
list<A*> alist;
        for (list<A*>::iterator iter = alist.begin(); iter !=
alist.end(); ++iter) {
                  A* a = (*iter);
                  if ( a->aFunc( i, j) {
               destList.push_back(a);
                        }
                }
I try doing this, but it does not compile:
for_each(alist.begin(), alist.end(), 
        if_then(  bind(&A::aFunc, _1 , i, j ),
columnBlocks.push_back(_1)));
There are my errors:
 error: no matching function for call to
âstd::vector<A*, std::allocator<A*>
>::push_back(const
boost::lambda::lambda_functor<boost::lambda::placeholder<1>
>&)
error: âif_thenâ was not declared in this scope
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com