summaryrefslogtreecommitdiff
path: root/Examples/scilab
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-06-07 19:05:46 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-06-27 07:40:49 +0100
commitf3357f1f5709f6008418f839cca336250c807841 (patch)
tree3dd4717a4018e47b1e968f9cc394a06a57a02c0f /Examples/scilab
parentc8cef5c2f223062340bad0c983d475bf418b1907 (diff)
downloadswig-f3357f1f5709f6008418f839cca336250c807841.tar.gz
Remove use of std::bind2nd which is removed in C++17
Diffstat (limited to 'Examples/scilab')
-rw-r--r--Examples/scilab/std_vector/example.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Examples/scilab/std_vector/example.h b/Examples/scilab/std_vector/example.h
index 4f0dac70d..52e260d6d 100644
--- a/Examples/scilab/std_vector/example.h
+++ b/Examples/scilab/std_vector/example.h
@@ -17,9 +17,8 @@ std::vector<double> half(const std::vector<double>& v) {
}
void halve_in_place(std::vector<double>& v) {
- // would you believe this is the same as the above?
- 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;
}