File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/mongocxx/options/private Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ class transaction::impl {
6161 if (!rc) {
6262 return {};
6363 }
64- return {stdx::make_unique<read_concern::impl>(libmongoc::read_concern_copy (rc))};
64+ class read_concern rci (
65+ stdx::make_unique<read_concern::impl>(libmongoc::read_concern_copy(rc)));
66+ return stdx::optional<class read_concern >(std::move (rci));
6567 }
6668
6769 void write_concern (const class write_concern & wc) {
@@ -74,7 +76,9 @@ class transaction::impl {
7476 if (!wc) {
7577 return {};
7678 }
77- return {stdx::make_unique<write_concern::impl>(libmongoc::write_concern_copy (wc))};
79+ class write_concern wci (
80+ stdx::make_unique<write_concern::impl>(libmongoc::write_concern_copy(wc)));
81+ return stdx::optional<class write_concern >(std::move (wci));
7882 }
7983
8084 void read_preference (const class read_preference & rp) {
@@ -87,7 +91,9 @@ class transaction::impl {
8791 if (!rp) {
8892 return {};
8993 }
90- return {stdx::make_unique<read_preference::impl>(libmongoc::read_prefs_copy (rp))};
94+ class read_preference rpi (
95+ stdx::make_unique<read_preference::impl>(libmongoc::read_prefs_copy(rp)));
96+ return stdx::optional<class read_preference >(std::move (rpi));
9197 }
9298
9399 mongoc_transaction_opt_t * get_transaction_opt_t () const noexcept {
You can’t perform that action at this time.
0 commit comments