Using std::inner_product