• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# basic_json::meta
2
3```cpp
4static basic_json meta();
5```
6
7This function returns a JSON object with information about the library,
8including the version number and information on the platform and compiler.
9
10## Return value
11
12JSON object holding version information
13
14key         | description
15----------- | ---------------
16`compiler`  | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version).
17`copyright` | The copyright line for the library as string.
18`name`      | The name of the library as string.
19`platform`  | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`.
20`url`       | The URL of the project as string.
21`version`   | The version of the library. It is an object with the following keys: `major`, `minor`, and `patch` as defined by [Semantic Versioning](http://semver.org), and `string` (the version string).
22
23## Exception safety
24
25Strong guarantee: if an exception is thrown, there are no
26changes to any JSON value.
27
28## Complexity
29
30Constant.
31
32## Example
33
34The following code shows an example output of the `meta()`
35function.
36
37```cpp
38--8<-- "examples/meta.cpp"
39```
40
41Output:
42
43```json
44--8<-- "examples/meta.output"
45```
46