From 2ca07de83c3cc6a2cb285eb82d4dc9c3ed4fe8a0 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Sun, 17 Jan 2016 22:36:39 +0100 Subject: [PATCH] minor fix for PYBIND11_OBJECT_CVT --- include/pybind11/pytypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 98dc90c0a..03ebc3229 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -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(object::operator=(std::move(o))); CvtStmt; } \ + Name& operator=(object&& o) { (void) static_cast(object::operator=(std::move(o))); CvtStmt; return *this; } \ Name& operator=(object& o) { return static_cast(object::operator=(o)); CvtStmt; } \ bool check() const { return m_ptr != nullptr && (bool) CheckFun(m_ptr); }