We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bbcdee commit 3a395e6Copy full SHA for 3a395e6
include/pybind11/pytypes.h
@@ -1640,10 +1640,12 @@ class str : public object {
1640
str(std::u8string_view s) : str(reinterpret_cast<const char *>(s.data()), s.size()) {}
1641
# endif
1642
1643
- // Avoid ambiguity when converting from kwargs (GCC)
1644
- explicit str(const kwargs &k) : str(static_cast<handle>(k)) {}
1645
1646
#endif
+ // Avoid ambiguity when converting from kwargs (GCC)
+ template <typename T,
1647
+ detail::enable_if_t<std::is_same<T, kwargs>::value, int> = 0>
1648
+ explicit str(const T &k) : str(static_cast<handle>(k)) {}
1649
1650
explicit str(const bytes &b);
1651
0 commit comments