I am getting this error message when I build my code,
"a lambda that has been specified to have a void return type cannot return a value"
bool StockCheck::InStock(const Shop& shop) const
{
return std::any_of(m_products, [&shop, this](const std::unique_ptr<SelectedProduct>& selected)
{
auto inStock = selected->ProductInStock(shop);
return inStock != SelectedProduct::NOT_IN_STOCK && selected->GetProductInStock(code);
});
}
I am using VS2010, is it a problem? This will work in VS2013?
-> boolas workaround ?