From 15e3e81cb56ec5826e188d3902acd2e3c7af4929 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Thu, 19 Aug 2021 21:08:20 -0700 Subject: [PATCH] remove likely culprit for #5493 @zwimer: I had to remove a different move constructor before in the same API due to a different bug that the coverage tool exposed. I was unable to reproduce the bug reported in #5493 in my environment, but the interaction with reference counting and move constructors is sufficiently opaque that I rather not have to fix more bugs introduced with move constructors in the API. I am therefore removing also this use of && and maybe this fixes #5493 --- src/api/c++/z3++.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/api/c++/z3++.h b/src/api/c++/z3++.h index bd20a86f9..40edf2fec 100644 --- a/src/api/c++/z3++.h +++ b/src/api/c++/z3++.h @@ -507,7 +507,6 @@ namespace z3 { ast(context & c):object(c), m_ast(0) {} ast(context & c, Z3_ast n):object(c), m_ast(n) { Z3_inc_ref(ctx(), m_ast); } ast(ast const & s) :object(s), m_ast(s.m_ast) { Z3_inc_ref(ctx(), m_ast); } - ast(ast && s) noexcept : object(std::forward(s)), m_ast(s.m_ast) { s.m_ast = nullptr; } ~ast() { if (m_ast) Z3_dec_ref(*m_ctx, m_ast); } operator Z3_ast() const { return m_ast; } operator bool() const { return m_ast != 0; }