Closed InvincibleRMC closed 2 days ago
Split off from #5212
Due to how tuple_caster implements it's type generation it works for all tuples except the empty tuple which previously generated tuple[] rather than the correct tuple[()]
tuple[]
tuple[()]
https://github.com/pybind/pybind11/blob/51c2aa16de5b50fe4be6a0016d6090d4a831899e/include/pybind11/cast.h#L675-L677
Adds Special type annotation for C++ empty tuple.
Description
Split off from #5212
Due to how tuple_caster implements it's type generation it works for all tuples except the empty tuple which previously generated
tuple[]
rather than the correcttuple[()]
https://github.com/pybind/pybind11/blob/51c2aa16de5b50fe4be6a0016d6090d4a831899e/include/pybind11/cast.h#L675-L677
Suggested changelog entry: