On Friday, 17 October 2014 at 11:44:29 UTC, Ola Fosheim Grøstad wrote:
On Friday, 17 October 2014 at 10:17:38 UTC, eles wrote:

(not tested :^)

template<typename T>
auto mittelwert_accumulate2(const T &vektor) ->typename T::value_type
{
return accumulate(vektor.cbegin(), vektor.cend(), static_cast<typename T::value_type>(0)) / distance(vektor.cbegin(), vektor.cend());
}

(gcc does not yet support std::cbegin() and std::cend()).

(tested :^)

Reply via email to