portability

This commit is contained in:
Vitor Santos Costa 2017-10-01 23:30:53 +01:00
parent 46d997713f
commit c06dd92761

View File

@ -190,7 +190,7 @@ Util::apply_n_times (
template <typename T> void template <typename T> void
Util::log (std::vector<T>& v) Util::log (std::vector<T>& v)
{ {
std::transform (v.begin(), v.end(), v.begin(), ::log); std::transform (v.begin(), v.end(), v.begin(), (double (*)(double))std::log);
} }
@ -198,7 +198,7 @@ Util::log (std::vector<T>& v)
template <typename T> void template <typename T> void
Util::exp (std::vector<T>& v) Util::exp (std::vector<T>& v)
{ {
std::transform (v.begin(), v.end(), v.begin(), ::exp); std::transform (v.begin(), v.end(), v.begin(), (double (*)(double))std::exp);
} }