commit | 3f200fab2237ea478a71997a9864b935506bb96e | [log] [tgz] |
---|---|---|
author | Wenzel Jakob <wenzel.jakob@epfl.ch> | Tue May 17 15:35:29 2016 +0200 |
committer | Wenzel Jakob <wenzel.jakob@epfl.ch> | Tue May 17 15:35:29 2016 +0200 |
tree | 887d031ed17e739aa533982ae6bb2af5046b4027 | |
parent | a439ccaa0e41899f0f656f798891ea1b3d999951 [diff] [blame] |
don't implicitly convert doubles to ints
diff --git a/example/issues.cpp b/example/issues.cpp index a462214..d1a1941 100644 --- a/example/issues.cpp +++ b/example/issues.cpp
@@ -104,4 +104,8 @@ // (no id): should not be able to pass 'None' to a reference argument m2.def("print_element", [](ElementA &el) { std::cout << el.value() << std::endl; }); + + // (no id): don't cast doubles to ints + m2.def("expect_float", [](float f) { return f; }); + m2.def("expect_int", [](int i) { return i; }); }