1MONGOC_VERSION(3)                  libmongoc                 MONGOC_VERSION(3)
2
3
4

NAME

6       mongoc_version - Version Checks
7
8       Conditional compilation based on mongoc version
9

DESCRIPTION

11       The following preprocessor macros can be used to perform various checks
12       based on the version of the library you are  compiling  against.   This
13       may be useful if you only want to enable a feature on a certain version
14       of the library.
15
16          #include <mongoc/mongoc.h>
17
18          #define MONGOC_MAJOR_VERSION (x)
19          #define MONGOC_MINOR_VERSION (y)
20          #define MONGOC_MICRO_VERSION (z)
21          #define MONGOC_VERSION_S     "x.y.z"
22          #define MONGOC_VERSION_HEX   ((1 << 24) | (0 << 16) | (0 << 8) | 0)
23          #define MONGOC_CHECK_VERSION(major, minor, micro)
24
25       Only compile a block on MongoDB C Driver 1.1.0 and newer.
26
27          #if MONGOC_CHECK_VERSION(1, 1, 0)
28          static void
29          do_something (void)
30          {
31          }
32          #endif
33

AUTHOR

35       MongoDB, Inc
36
38       2017-present, MongoDB, Inc
39
40
41
42
431.21.1                           Mar 02, 2022                MONGOC_VERSION(3)
Impressum