File: instance.md

package info (click to toggle)
mongo-cxx-driver 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 13,832 kB
  • sloc: cpp: 61,365; python: 1,436; sh: 356; xml: 253; perl: 215; makefile: 21
file content (21 lines) | stat: -rw-r--r-- 526 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Initialize the C++ Driver

## Basic Usage

@snippet api/mongocxx/examples/instance/basic_usage.cpp Example

## With Static Lifetime

@warning This pattern depends on an exit-time destructor with indeterminate order relative to other objects with static lifetime being destroyed.

@snippet api/mongocxx/examples/instance/current.cpp Example

# Errors

## Instance Recreation

@snippet api/mongocxx/examples/instance/recreation.cpp Example

## Destroyed Instance

@snippet api/mongocxx/examples/instance/destroyed.cpp Example