samedi 22 mai 2021

auto is not allowed here in C++11

void OrderBook::withdrawOrder( string& time){

  orders.erase(std::remove(orders.begin(), orders.end(),[&time](auto 
  order){ return order.timestamp == time && order.username == "simuser"; }),
  orders.end());
    
  
}

This is my code, auto before criteria is giving error "auto is now allowed here". What am I doing wrong.```

Aucun commentaire:

Enregistrer un commentaire