• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# <small>nlohmann::basic_json::</small>get_allocator
2
3```cpp
4static allocator_type get_allocator();
5```
6
7Returns the allocator associated with the container.
8
9## Return value
10
11associated allocator
12
13## Examples
14
15??? example
16
17    The example shows how `get_allocator()` is used to created `json` values.
18
19    ```cpp
20    --8<-- "examples/get_allocator.cpp"
21    ```
22
23    Output:
24
25    ```json
26    --8<-- "examples/get_allocator.output"
27    ```
28
29## Version history
30
31- Added in version 1.0.0.
32