minor fix for PYBIND11_OBJECT_CVT

This commit is contained in:
Wenzel Jakob 2016-01-17 22:36:39 +01:00
parent 5f218b3f2c
commit 2ca07de83c

View File

@ -228,7 +228,7 @@ inline iterator handle::end() const { return iterator(nullptr); }
Name(const handle &h, bool borrowed) : Parent(h, borrowed) { CvtStmt; } \
Name(const object& o): Parent(o) { CvtStmt; } \
Name(object&& o): Parent(std::move(o)) { CvtStmt; } \
Name& operator=(object&& o) { return static_cast<Name&>(object::operator=(std::move(o))); CvtStmt; } \
Name& operator=(object&& o) { (void) static_cast<Name&>(object::operator=(std::move(o))); CvtStmt; return *this; } \
Name& operator=(object& o) { return static_cast<Name&>(object::operator=(o)); CvtStmt; } \
bool check() const { return m_ptr != nullptr && (bool) CheckFun(m_ptr); }