We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4a7859 commit 35493c9Copy full SHA for 35493c9
docs/advanced/cast/custom.rst
@@ -46,7 +46,7 @@ type is explicitly allowed.
46
* function signatures and declares a local variable
47
* 'value' of type inty
48
*/
49
- PYBIND11_TYPE_CASTER(inty, _("inty"));
+ PYBIND11_TYPE_CASTER(inty, const_str("inty"));
50
51
/**
52
* Conversion part 1 (Python->C++): convert a PyObject into a inty
docs/upgrade.rst
@@ -17,6 +17,10 @@ v2.9
17
converted to using ``py::module_::import("types").attr("SimpleNamespace")``
18
instead.
19
20
+* The use of ``_`` in custom type casters can now be replaced with the more
21
+ readable ``const_str`` instead. The old ``_`` shortcut has been retained
22
+ unless it is being used as a macro (like for gettext).
23
+
24
25
.. _upgrade-guide-2.7:
26
0 commit comments