Remove use of std::bind2nd which is removed in C++17

This commit is contained in:
William S Fulton 2019-06-07 19:05:46 +01:00
commit f3357f1f57
12 changed files with 24 additions and 31 deletions

View file

@ -1581,8 +1581,8 @@ std::vector<double> half(const std::vector<double>& v) {
}
void halve_in_place(std::vector<double>& v) {
std::transform(v.begin(), v.end(), v.begin(),
std::bind2nd(std::divides<double>(), 2.0));
for (std::vector<double>::iterator it = v.begin(); it != v.end(); ++it)
*it /= 2.0;
}
</pre>
</div>