Address issue with handle::cast<bool>(), quench warning in example 12 (fixes #110)

This commit is contained in:
Wenzel Jakob 2016-02-23 23:50:21 +01:00
parent 9cfa71f411
commit 4a50fa5cd4
2 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ public:
Example12,
run_bool
);
throw std::runtime_error("this will never be reached");
}
virtual void pure_virtual() {

View File

@ -574,7 +574,7 @@ template <typename T> inline object cast(const T &value, return_value_policy pol
return object(detail::type_caster<typename detail::intrinsic_type<T>::type>::cast(value, policy, parent), false);
}
template <typename T> inline T handle::cast() const { return pybind11::cast<T>(m_ptr); }
template <typename T> inline T handle::cast() const { return pybind11::cast<T>(*this); }
template <> inline void handle::cast() const { return; }
template <typename... Args> inline object handle::call(Args&&... args_) const {