Commit 4a50fa5c by Wenzel Jakob

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

parent 9cfa71f4
...@@ -54,6 +54,7 @@ public: ...@@ -54,6 +54,7 @@ public:
Example12, Example12,
run_bool run_bool
); );
throw std::runtime_error("this will never be reached");
} }
virtual void pure_virtual() { virtual void pure_virtual() {
......
...@@ -574,7 +574,7 @@ template <typename T> inline object cast(const T &value, return_value_policy pol ...@@ -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); 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 <> inline void handle::cast() const { return; }
template <typename... Args> inline object handle::call(Args&&... args_) const { template <typename... Args> inline object handle::call(Args&&... args_) const {
......
Markdown is supported
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