Reputation: 1
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.```
Upvotes: 0
Views: 657
Reputation: 238311
What am I doing wrong.
You are using auto
for a lambda parameter in a language version where that's not allowed.
How do i fix it?
Potential solutions:
auto
lambda parameters were introduced.Upvotes: 1