1BSON_VERSION(3) libbson BSON_VERSION(3)
2
3
4
6 bson_version - Libbson Versioning
7
8 Versioning Macros and Functions
9
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 may
13 be useful if you only want to enable a feature on a certain version of
14 the library.
15
17 #define BSON_CHECK_VERSION(major, minor, micro)
18
19 #define BSON_MAJOR_VERSION (1)
20 #define BSON_MINOR_VERSION (4)
21 #define BSON_MICRO_VERSION (1)
22 #define BSON_VERSION_S "1.4.1"
23
24 #define BSON_VERSION_HEX \
25 (BSON_MAJOR_VERSION << 24 | BSON_MINOR_VERSION << 16 | \
26 BSON_MICRO_VERSION << 8)
27
28 Only compile a block on Libbson 1.1.0 and newer.
29
30 #if BSON_CHECK_VERSION(1, 1, 0)
31 static void
32 do_something (void)
33 {
34 }
35 #endif
36
38 MongoDB, Inc
39
41 2017-present, MongoDB, Inc
42
43
44
45
461.17.6 Jun 03, 2021 BSON_VERSION(3)