Skip to content

Conversation

@Mohataseem89
Copy link

Fixes #5938

GCC reports an ambiguous overload when calling py::str(kwargs) due to
multiple implicit conversions (handle/object)

this PR adds an explicit str(const kwargs&) constructor forwarding to
str(handle), resolving the ambiguity while preserving existing behavior

a small regression test is added to ensure py::str(kwargs) remains
unambiguous across compilers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: call of overloaded ‘str(const pybind11::kwargs&)’ is ambiguous

1 participant