Combine std::tuple/std::pair logic
The std::pair caster can be written as a special case of the std::tuple
caster; this combines them via a base `tuple_caster` class (which is
essentially identical to the previous std::tuple caster).
This also removes the special empty tuple base case: returning an empty
tuple is relatively rare, and the base case still works perfectly well
even when the tuple types is an empty list.
diff --git a/tests/test_builtin_casters.cpp b/tests/test_builtin_casters.cpp
index 55269ba..6733402 100644
--- a/tests/test_builtin_casters.cpp
+++ b/tests/test_builtin_casters.cpp
@@ -85,7 +85,7 @@
m.def("tuple_passthrough", [](std::tuple<bool, std::string, int> input) {
return std::make_tuple(std::get<2>(input), std::get<1>(input), std::get<0>(input));
}, "Return a triple in reversed order");
-
+ m.def("empty_tuple", []() { return std::tuple<>(); });
// test_builtins_cast_return_none
m.def("return_none_string", []() -> std::string * { return nullptr; });