Use decltype to deduce return type of PyThread_create_key
diff --git a/example/example4.cpp b/example/example4.cpp
index 281eafe..7e17864 100644
--- a/example/example4.cpp
+++ b/example/example4.cpp
@@ -38,7 +38,7 @@
 
 float test_function3(int i) {
     std::cout << "test_function(" << i << ")" << std::endl;
-    return i / 2.f;
+    return (float) i / 2.f;
 }
 
 py::bytes return_bytes() {