mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-13 09:46:10 +00:00
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.