Commit c889ebd0 authored by Dean Moldovan's avatar Dean Moldovan
Browse files

Make operator bool() explicit

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.
parent 135fd149
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment