From 6a45d058de2b7d05d208a9556c10fd2580a5cdeb Mon Sep 17 00:00:00 2001 From: Dirk Vanden Boer Date: Thu, 5 Jul 2018 21:45:14 +0200 Subject: [PATCH] Fixed transaction_t move constructor --- include/sqlpp11/transaction.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/sqlpp11/transaction.h b/include/sqlpp11/transaction.h index a27ebaee..353b461e 100644 --- a/include/sqlpp11/transaction.h +++ b/include/sqlpp11/transaction.h @@ -66,7 +66,12 @@ namespace sqlpp } transaction_t(const transaction_t&) = delete; - transaction_t(transaction_t&&) = default; + transaction_t(transaction_t&& other) + : _db(other._db), _report_unfinished_transaction(other._report_unfinished_transaction), _finished(other._finished) + { + other._finished = true; + } + transaction_t& operator=(const transaction_t&) = delete; transaction_t& operator=(transaction_t&&) = delete;