mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 09:25:51 +00:00
c889ebd0e1
This prevents unwanted conversions to bool or int such as: ``` py::object my_object; std::cout << my_object << std::endl; // compiles and prints 0 or 1 int n = my_object; // compiles and is nonsense ``` With `explicit operator bool()` the above cases become compiler errors. |
||
---|---|---|
.. | ||
pybind11 |