File tree 1 file changed +9
-3
lines changed
src/mongocxx/options/private
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ class transaction::impl {
61
61
if (!rc) {
62
62
return {};
63
63
}
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));
65
67
}
66
68
67
69
void write_concern (const class write_concern & wc) {
@@ -74,7 +76,9 @@ class transaction::impl {
74
76
if (!wc) {
75
77
return {};
76
78
}
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));
78
82
}
79
83
80
84
void read_preference (const class read_preference & rp) {
@@ -87,7 +91,9 @@ class transaction::impl {
87
91
if (!rp) {
88
92
return {};
89
93
}
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));
91
97
}
92
98
93
99
mongoc_transaction_opt_t * get_transaction_opt_t () const noexcept {
You can’t perform that action at this time.
0 commit comments