1BSON_VERSION(3)                     libbson                    BSON_VERSION(3)
2
3
4
5Versioning Macros and Functions
6

MACROS

8       The following preprocessor macros can be used to perform various checks
9       based on the version of the library you are compiling against. This may
10       be  useful if you only want to enable a feature on a certain version of
11       the library.
12

SYNOPSIS

14          #define BSON_CHECK_VERSION(major, minor, micro)
15
16          #define BSON_MAJOR_VERSION (1)
17          #define BSON_MINOR_VERSION (4)
18          #define BSON_MICRO_VERSION (1)
19          #define BSON_VERSION_S "1.4.1"
20
21          #define BSON_VERSION_HEX                                  \
22             (BSON_MAJOR_VERSION << 24 | BSON_MINOR_VERSION << 16 | \
23              BSON_MICRO_VERSION << 8)
24
25       Only compile a block on Libbson 1.1.0 and newer.
26
27          #if BSON_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.25.1                           Nov 08, 2023                  BSON_VERSION(3)
Impressum