void communicator::flush(bool wait)
{
- sent_comm.remove_if(comm_test_n_destroy);
+ sent_comm_type::iterator bound;
+ bound = std::remove_if(sent_comm.begin(), sent_comm.end(),
+ comm_test_n_destroy);
+ sent_comm.erase(bound, sent_comm.end());
if (wait && !sent_comm.empty()) {
msg_comm_t comms[sent_comm.size()];
std::copy(sent_comm.begin(), sent_comm.end(), comms);