You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,26 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu
25
25
- Apple Clang 13.1 with Xcode 13.4.1 (from Apple Clang 5.1 with Xcode 5.1).
26
26
- MSVC 19.0.24210 with Visual Studio 2015 Update 3 (from MSVC 19.0.23506 with Visual Studio 2015 Update 1).
27
27
28
+
### Deprecated
29
+
30
+
-`mongocxx::v_noabi::instance::current()` is "for internal use only". The `instance` constructor(s) should be used instead.
31
+
- Creating the `instance` object in the scope of `main()`, or in an appropriate (non-global) scope such that its (non-static) lifetime is valid for the duration of all other mongocxx library operations, is recommended over the following workarounds.
32
+
- If there is only _one_ call to `current()` present within an application, it may be replaced with a static local variable:
33
+
```cpp
34
+
// Before:
35
+
mongocxx::instance::current();
36
+
37
+
// After:
38
+
static mongocxx::instance instance; // Only ONE instance object!
39
+
```
40
+
- If there are _multiple_ calls to `current()` present within an application, they may be replaced with a call to a user-defined function containing the static local variable:
41
+
```cpp
42
+
mongocxx::instance& mongocxx_instance() {
43
+
static mongocxx::instance instance; // Only ONE instance object!
0 commit comments