2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
30#ifndef INCLUDE_NLOHMANN_JSON_HPP_
31#define INCLUDE_NLOHMANN_JSON_HPP_
33#define NLOHMANN_JSON_VERSION_MAJOR 3
34#define NLOHMANN_JSON_VERSION_MINOR 10
35#define NLOHMANN_JSON_VERSION_PATCH 2
40#include <initializer_list>
62#include <forward_list>
68#include <unordered_map>
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
135
136
137
138
139
140
141
142
143
144
145
146
149 static constexpr std::array<
std::uint8_t, 9> order = { {
156 const auto l_index =
static_cast<
std::size_t>(lhs);
157 const auto r_index =
static_cast<
std::size_t>(rhs);
158 return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index];
175
176
177
178
179
180
181
182
183
184
186#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15
)
187#if defined(JSON_HEDLEY_VERSION)
188#undef JSON_HEDLEY_VERSION
190#define JSON_HEDLEY_VERSION 15
192#if defined(JSON_HEDLEY_STRINGIFY_EX)
193#undef JSON_HEDLEY_STRINGIFY_EX
195#define JSON_HEDLEY_STRINGIFY_EX(x) #x
197#if defined(JSON_HEDLEY_STRINGIFY)
198#undef JSON_HEDLEY_STRINGIFY
200#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x)
202#if defined(JSON_HEDLEY_CONCAT_EX)
203#undef JSON_HEDLEY_CONCAT_EX
205#define JSON_HEDLEY_CONCAT_EX(a,b) a##b
207#if defined(JSON_HEDLEY_CONCAT)
208#undef JSON_HEDLEY_CONCAT
210#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b)
212#if defined(JSON_HEDLEY_CONCAT3_EX)
213#undef JSON_HEDLEY_CONCAT3_EX
215#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c
217#if defined(JSON_HEDLEY_CONCAT3)
218#undef JSON_HEDLEY_CONCAT3
220#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c)
222#if defined(JSON_HEDLEY_VERSION_ENCODE)
223#undef JSON_HEDLEY_VERSION_ENCODE
225#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000
) + ((minor) * 1000
) + (revision))
227#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR)
228#undef JSON_HEDLEY_VERSION_DECODE_MAJOR
230#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000
)
232#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR)
233#undef JSON_HEDLEY_VERSION_DECODE_MINOR
235#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000
) / 1000
)
237#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION)
238#undef JSON_HEDLEY_VERSION_DECODE_REVISION
240#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000
)
242#if defined(JSON_HEDLEY_GNUC_VERSION)
243#undef JSON_HEDLEY_GNUC_VERSION
245#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)
246#define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
247#elif defined(__GNUC__)
248#define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0
)
251#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK)
252#undef JSON_HEDLEY_GNUC_VERSION_CHECK
254#if defined(JSON_HEDLEY_GNUC_VERSION)
255#define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
257#define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0
)
260#if defined(JSON_HEDLEY_MSVC_VERSION)
261#undef JSON_HEDLEY_MSVC_VERSION
263#if defined(_MSC_FULL_VER
) && (_MSC_FULL_VER
>= 140000000
) && !defined(__ICL)
264#define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER
/ 10000000
, (_MSC_FULL_VER
% 10000000
) / 100000
, (_MSC_FULL_VER
% 100000
) / 100
)
265#elif defined(_MSC_FULL_VER) && !defined(__ICL)
266#define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000
, (_MSC_FULL_VER % 1000000
) / 10000
, (_MSC_FULL_VER % 10000
) / 10
)
267#elif defined(_MSC_VER) && !defined(__ICL)
268#define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100
, _MSC_VER % 100
, 0
)
271#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK)
272#undef JSON_HEDLEY_MSVC_VERSION_CHECK
274#if !defined(JSON_HEDLEY_MSVC_VERSION
)
275#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0
)
276#elif defined(_MSC_VER
) && (_MSC_VER
>= 1400
)
277#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER
>= ((major * 10000000
) + (minor * 100000
) + (patch)))
278#elif defined(_MSC_VER) && (_MSC_VER >= 1200
)
279#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000
) + (minor * 10000
) + (patch)))
281#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100
) + (minor)))
284#if defined(JSON_HEDLEY_INTEL_VERSION)
285#undef JSON_HEDLEY_INTEL_VERSION
287#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL)
288#define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100
, __INTEL_COMPILER % 100
, __INTEL_COMPILER_UPDATE)
289#elif defined(__INTEL_COMPILER) && !defined(__ICL)
290#define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100
, __INTEL_COMPILER % 100
, 0
)
293#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK)
294#undef JSON_HEDLEY_INTEL_VERSION_CHECK
296#if defined(JSON_HEDLEY_INTEL_VERSION)
297#define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
299#define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0
)
302#if defined(JSON_HEDLEY_INTEL_CL_VERSION)
303#undef JSON_HEDLEY_INTEL_CL_VERSION
305#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL)
306#define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0
)
309#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK)
310#undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK
312#if defined(JSON_HEDLEY_INTEL_CL_VERSION)
313#define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
315#define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0
)
318#if defined(JSON_HEDLEY_PGI_VERSION)
319#undef JSON_HEDLEY_PGI_VERSION
321#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
322#define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)
325#if defined(JSON_HEDLEY_PGI_VERSION_CHECK)
326#undef JSON_HEDLEY_PGI_VERSION_CHECK
328#if defined(JSON_HEDLEY_PGI_VERSION)
329#define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
331#define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0
)
334#if defined(JSON_HEDLEY_SUNPRO_VERSION)
335#undef JSON_HEDLEY_SUNPRO_VERSION
337#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000
)
338#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16
) & 0xf
) * 10
) + ((__SUNPRO_C >> 12
) & 0xf
), (((__SUNPRO_C >> 8
) & 0xf
) * 10
) + ((__SUNPRO_C >> 4
) & 0xf
), (__SUNPRO_C & 0xf
) * 10
)
339#elif defined(__SUNPRO_C)
340#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8
) & 0xf
, (__SUNPRO_C >> 4
) & 0xf
, (__SUNPRO_C) & 0xf
)
341#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000
)
342#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16
) & 0xf
) * 10
) + ((__SUNPRO_CC >> 12
) & 0xf
), (((__SUNPRO_CC >> 8
) & 0xf
) * 10
) + ((__SUNPRO_CC >> 4
) & 0xf
), (__SUNPRO_CC & 0xf
) * 10
)
343#elif defined(__SUNPRO_CC)
344#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8
) & 0xf
, (__SUNPRO_CC >> 4
) & 0xf
, (__SUNPRO_CC) & 0xf
)
347#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK)
348#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK
350#if defined(JSON_HEDLEY_SUNPRO_VERSION)
351#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
353#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0
)
356#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)
357#undef JSON_HEDLEY_EMSCRIPTEN_VERSION
359#if defined(__EMSCRIPTEN__)
360#define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__)
363#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK)
364#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
366#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)
367#define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
369#define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0
)
372#if defined(JSON_HEDLEY_ARM_VERSION)
373#undef JSON_HEDLEY_ARM_VERSION
375#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)
376#define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000
, (__ARMCOMPILER_VERSION % 1000000
) / 10000
, (__ARMCOMPILER_VERSION % 10000
) / 100
)
377#elif defined(__CC_ARM) && defined(__ARMCC_VERSION)
378#define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000
, (__ARMCC_VERSION % 1000000
) / 10000
, (__ARMCC_VERSION % 10000
) / 100
)
381#if defined(JSON_HEDLEY_ARM_VERSION_CHECK)
382#undef JSON_HEDLEY_ARM_VERSION_CHECK
384#if defined(JSON_HEDLEY_ARM_VERSION)
385#define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
387#define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0
)
390#if defined(JSON_HEDLEY_IBM_VERSION)
391#undef JSON_HEDLEY_IBM_VERSION
393#if defined(__ibmxl__)
394#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__)
395#elif defined(__xlC__) && defined(__xlC_ver__)
396#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8
, __xlC__ & 0xff
, (__xlC_ver__ >> 8
) & 0xff
)
397#elif defined(__xlC__)
398#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8
, __xlC__ & 0xff
, 0
)
401#if defined(JSON_HEDLEY_IBM_VERSION_CHECK)
402#undef JSON_HEDLEY_IBM_VERSION_CHECK
404#if defined(JSON_HEDLEY_IBM_VERSION)
405#define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
407#define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0
)
410#if defined(JSON_HEDLEY_TI_VERSION)
411#undef JSON_HEDLEY_TI_VERSION
414 defined(__TI_COMPILER_VERSION__) &&
416 defined(__TMS470__) || defined(__TI_ARM__) ||
417 defined(__MSP430__) ||
418 defined(__TMS320C2000__)
420#if (__TI_COMPILER_VERSION__ >= 16000000
)
421#define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000
, (__TI_COMPILER_VERSION__ % 1000000
) / 1000
, (__TI_COMPILER_VERSION__ % 1000
))
425#if defined(JSON_HEDLEY_TI_VERSION_CHECK)
426#undef JSON_HEDLEY_TI_VERSION_CHECK
428#if defined(JSON_HEDLEY_TI_VERSION)
429#define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
431#define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0
)
434#if defined(JSON_HEDLEY_TI_CL2000_VERSION)
435#undef JSON_HEDLEY_TI_CL2000_VERSION
437#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__)
438#define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000
, (__TI_COMPILER_VERSION__ % 1000000
) / 1000
, (__TI_COMPILER_VERSION__ % 1000
))
441#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK)
442#undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK
444#if defined(JSON_HEDLEY_TI_CL2000_VERSION)
445#define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
447#define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0
)
450#if defined(JSON_HEDLEY_TI_CL430_VERSION)
451#undef JSON_HEDLEY_TI_CL430_VERSION
453#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__)
454#define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000
, (__TI_COMPILER_VERSION__ % 1000000
) / 1000
, (__TI_COMPILER_VERSION__ % 1000
))
457#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK)
458#undef JSON_HEDLEY_TI_CL430_VERSION_CHECK
460#if defined(JSON_HEDLEY_TI_CL430_VERSION)
461#define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
463#define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0
)
466#if defined(JSON_HEDLEY_TI_ARMCL_VERSION)
467#undef JSON_HEDLEY_TI_ARMCL_VERSION
469#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__))
470#define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000
, (__TI_COMPILER_VERSION__ % 1000000
) / 1000
, (__TI_COMPILER_VERSION__ % 1000
))
473#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK)
474#undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK
476#if defined(JSON_HEDLEY_TI_ARMCL_VERSION)
477#define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
479#define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0
)
482#if defined(JSON_HEDLEY_TI_CL6X_VERSION)
483#undef JSON_HEDLEY_TI_CL6X_VERSION
485#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__)
486#define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000
, (__TI_COMPILER_VERSION__ % 1000000
) / 1000
, (__TI_COMPILER_VERSION__ % 1000
))
489#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK)
490#undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK
492#if defined(JSON_HEDLEY_TI_CL6X_VERSION)
493#define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
495#define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0
)
498#if defined(JSON_HEDLEY_TI_CL7X_VERSION)
499#undef JSON_HEDLEY_TI_CL7X_VERSION
501#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__)
502#define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000
, (__TI_COMPILER_VERSION__ % 1000000
) / 1000
, (__TI_COMPILER_VERSION__ % 1000
))
505#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK)
506#undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK
508#if defined(JSON_HEDLEY_TI_CL7X_VERSION)
509#define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
511#define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0
)
514#if defined(JSON_HEDLEY_TI_CLPRU_VERSION)
515#undef JSON_HEDLEY_TI_CLPRU_VERSION
517#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__)
518#define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000
, (__TI_COMPILER_VERSION__ % 1000000
) / 1000
, (__TI_COMPILER_VERSION__ % 1000
))
521#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK)
522#undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK
524#if defined(JSON_HEDLEY_TI_CLPRU_VERSION)
525#define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
527#define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0
)
530#if defined(JSON_HEDLEY_CRAY_VERSION)
531#undef JSON_HEDLEY_CRAY_VERSION
534#if defined(_RELEASE_PATCHLEVEL)
535#define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL)
537#define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0
)
541#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK)
542#undef JSON_HEDLEY_CRAY_VERSION_CHECK
544#if defined(JSON_HEDLEY_CRAY_VERSION)
545#define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
547#define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0
)
550#if defined(JSON_HEDLEY_IAR_VERSION)
551#undef JSON_HEDLEY_IAR_VERSION
553#if defined(__IAR_SYSTEMS_ICC__)
555#define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000
), ((__VER__ / 1000
) % 1000
), (__VER__ % 1000
))
557#define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100
, __VER__ % 100
, 0
)
561#if defined(JSON_HEDLEY_IAR_VERSION_CHECK)
562#undef JSON_HEDLEY_IAR_VERSION_CHECK
564#if defined(JSON_HEDLEY_IAR_VERSION)
565#define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
567#define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0
)
570#if defined(JSON_HEDLEY_TINYC_VERSION)
571#undef JSON_HEDLEY_TINYC_VERSION
573#if defined(__TINYC__)
574#define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000
, (__TINYC__ / 100
) % 10
, __TINYC__ % 100
)
577#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK)
578#undef JSON_HEDLEY_TINYC_VERSION_CHECK
580#if defined(JSON_HEDLEY_TINYC_VERSION)
581#define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
583#define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0
)
586#if defined(JSON_HEDLEY_DMC_VERSION)
587#undef JSON_HEDLEY_DMC_VERSION
590#define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8
, (__DMC__ >> 4
) & 0xf
, __DMC__ & 0xf
)
593#if defined(JSON_HEDLEY_DMC_VERSION_CHECK)
594#undef JSON_HEDLEY_DMC_VERSION_CHECK
596#if defined(JSON_HEDLEY_DMC_VERSION)
597#define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
599#define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0
)
602#if defined(JSON_HEDLEY_COMPCERT_VERSION)
603#undef JSON_HEDLEY_COMPCERT_VERSION
605#if defined(__COMPCERT_VERSION__)
606#define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000
, (__COMPCERT_VERSION__ / 100
) % 100
, __COMPCERT_VERSION__ % 100
)
609#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK)
610#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK
612#if defined(JSON_HEDLEY_COMPCERT_VERSION)
613#define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
615#define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0
)
618#if defined(JSON_HEDLEY_PELLES_VERSION)
619#undef JSON_HEDLEY_PELLES_VERSION
622#define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100
, __POCC__ % 100
, 0
)
625#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK)
626#undef JSON_HEDLEY_PELLES_VERSION_CHECK
628#if defined(JSON_HEDLEY_PELLES_VERSION)
629#define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
631#define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0
)
634#if defined(JSON_HEDLEY_MCST_LCC_VERSION)
635#undef JSON_HEDLEY_MCST_LCC_VERSION
637#if defined(__LCC__) && defined(__LCC_MINOR__)
638#define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100
, __LCC__ % 100
, __LCC_MINOR__)
641#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK)
642#undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK
644#if defined(JSON_HEDLEY_MCST_LCC_VERSION)
645#define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
647#define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0
)
650#if defined(JSON_HEDLEY_GCC_VERSION)
651#undef JSON_HEDLEY_GCC_VERSION
654 defined(JSON_HEDLEY_GNUC_VERSION) &&
655 !defined(__clang__
) &&
656 !defined(JSON_HEDLEY_INTEL_VERSION) &&
657 !defined(JSON_HEDLEY_PGI_VERSION) &&
658 !defined(JSON_HEDLEY_ARM_VERSION) &&
659 !defined(JSON_HEDLEY_CRAY_VERSION) &&
660 !defined(JSON_HEDLEY_TI_VERSION) &&
661 !defined(JSON_HEDLEY_TI_ARMCL_VERSION) &&
662 !defined(JSON_HEDLEY_TI_CL430_VERSION) &&
663 !defined(JSON_HEDLEY_TI_CL2000_VERSION) &&
664 !defined(JSON_HEDLEY_TI_CL6X_VERSION) &&
665 !defined(JSON_HEDLEY_TI_CL7X_VERSION) &&
666 !defined(JSON_HEDLEY_TI_CLPRU_VERSION) &&
667 !defined(__COMPCERT__) &&
668 !defined(JSON_HEDLEY_MCST_LCC_VERSION)
669#define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION
672#if defined(JSON_HEDLEY_GCC_VERSION_CHECK)
673#undef JSON_HEDLEY_GCC_VERSION_CHECK
675#if defined(JSON_HEDLEY_GCC_VERSION)
676#define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
678#define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0
)
681#if defined(JSON_HEDLEY_HAS_ATTRIBUTE)
682#undef JSON_HEDLEY_HAS_ATTRIBUTE
685 defined(__has_attribute
) &&
689# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute)
691# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0
)
694#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE)
695#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE
697#if defined(__has_attribute
)
698#define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
700#define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
703#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE)
704#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE
706#if defined(__has_attribute
)
707#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
709#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
712#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE)
713#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE
716 defined(__has_cpp_attribute
) &&
717 defined(__cplusplus
) &&
719#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute)
721#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0
)
724#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS)
725#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS
727#if !defined(__cplusplus
) || !defined(__has_cpp_attribute
)
728#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0
)
730 !defined(JSON_HEDLEY_PGI_VERSION) &&
731 !defined(JSON_HEDLEY_IAR_VERSION) &&
734#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute)
736#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0
)
739#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE)
740#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
742#if defined(__has_cpp_attribute
) && defined(__cplusplus
)
743#define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
745#define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
748#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE)
749#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
751#if defined(__has_cpp_attribute
) && defined(__cplusplus
)
752#define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
754#define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
757#if defined(JSON_HEDLEY_HAS_BUILTIN)
758#undef JSON_HEDLEY_HAS_BUILTIN
760#if defined(__has_builtin
)
761#define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin)
763#define JSON_HEDLEY_HAS_BUILTIN(builtin) (0
)
766#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN)
767#undef JSON_HEDLEY_GNUC_HAS_BUILTIN
769#if defined(__has_builtin
)
770#define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
772#define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
775#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN)
776#undef JSON_HEDLEY_GCC_HAS_BUILTIN
778#if defined(__has_builtin
)
779#define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
781#define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
784#if defined(JSON_HEDLEY_HAS_FEATURE)
785#undef JSON_HEDLEY_HAS_FEATURE
788#define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature)
790#define JSON_HEDLEY_HAS_FEATURE(feature) (0
)
793#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE)
794#undef JSON_HEDLEY_GNUC_HAS_FEATURE
797#define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
799#define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
802#if defined(JSON_HEDLEY_GCC_HAS_FEATURE)
803#undef JSON_HEDLEY_GCC_HAS_FEATURE
806#define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
808#define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
811#if defined(JSON_HEDLEY_HAS_EXTENSION)
812#undef JSON_HEDLEY_HAS_EXTENSION
814#if defined(__has_extension
)
815#define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension)
817#define JSON_HEDLEY_HAS_EXTENSION(extension) (0
)
820#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION)
821#undef JSON_HEDLEY_GNUC_HAS_EXTENSION
823#if defined(__has_extension
)
824#define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
826#define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
829#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION)
830#undef JSON_HEDLEY_GCC_HAS_EXTENSION
832#if defined(__has_extension
)
833#define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
835#define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
838#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE)
839#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
841#if defined(__has_declspec_attribute
)
842#define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute)
844#define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0
)
847#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE)
848#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
850#if defined(__has_declspec_attribute
)
851#define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
853#define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
856#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE)
857#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
859#if defined(__has_declspec_attribute
)
860#define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
862#define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
865#if defined(JSON_HEDLEY_HAS_WARNING)
866#undef JSON_HEDLEY_HAS_WARNING
868#if defined(__has_warning
)
869#define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning)
871#define JSON_HEDLEY_HAS_WARNING(warning) (0
)
874#if defined(JSON_HEDLEY_GNUC_HAS_WARNING)
875#undef JSON_HEDLEY_GNUC_HAS_WARNING
877#if defined(__has_warning
)
878#define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
880#define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
883#if defined(JSON_HEDLEY_GCC_HAS_WARNING)
884#undef JSON_HEDLEY_GCC_HAS_WARNING
886#if defined(__has_warning
)
887#define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
889#define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
893 (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L
)) ||
894 defined(__clang__
) ||
911#define JSON_HEDLEY_PRAGMA(value) _Pragma(#value)
912#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15
,0
,0
)
913#define JSON_HEDLEY_PRAGMA(value) __pragma(value)
915#define JSON_HEDLEY_PRAGMA(value)
918#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH)
919#undef JSON_HEDLEY_DIAGNOSTIC_PUSH
921#if defined(JSON_HEDLEY_DIAGNOSTIC_POP)
922#undef JSON_HEDLEY_DIAGNOSTIC_POP
924#if defined(__clang__
)
925#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
926#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
927#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
)
928#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
929#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
930#elif JSON_HEDLEY_GCC_VERSION_CHECK(4
,6
,0
)
931#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
932#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
934 JSON_HEDLEY_MSVC_VERSION_CHECK(15
,0
,0
) ||
935 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
936#define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push))
937#define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop))
938#elif JSON_HEDLEY_ARM_VERSION_CHECK(5
,6
,0
)
939#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push")
940#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop")
942 JSON_HEDLEY_TI_VERSION_CHECK(15
,12
,0
) ||
943 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5
,2
,0
) ||
944 JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,4
,0
) ||
945 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8
,1
,0
) ||
946 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
947 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,1
,0
)
948#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push")
949#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop")
950#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2
,90
,0
)
951#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
952#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
954#define JSON_HEDLEY_DIAGNOSTIC_PUSH
955#define JSON_HEDLEY_DIAGNOSTIC_POP
959
960#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
961#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
963#if defined(__cplusplus
)
967# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr)
968 JSON_HEDLEY_DIAGNOSTIC_PUSH
969 _Pragma("clang diagnostic ignored \"-Wc++98-compat\"")
970 _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"")
971 _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"")
973 JSON_HEDLEY_DIAGNOSTIC_POP
975# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr)
976 JSON_HEDLEY_DIAGNOSTIC_PUSH
977 _Pragma("clang diagnostic ignored \"-Wc++98-compat\"")
978 _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"")
980 JSON_HEDLEY_DIAGNOSTIC_POP
983# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr)
984 JSON_HEDLEY_DIAGNOSTIC_PUSH
985 _Pragma("clang diagnostic ignored \"-Wc++98-compat\"")
987 JSON_HEDLEY_DIAGNOSTIC_POP
992#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x
995#if defined(JSON_HEDLEY_CONST_CAST)
996#undef JSON_HEDLEY_CONST_CAST
998#if defined(__cplusplus
)
999# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast<T>(expr))
1001 JSON_HEDLEY_HAS_WARNING("-Wcast-qual") ||
1002 JSON_HEDLEY_GCC_VERSION_CHECK(4
,6
,0
) ||
1003 JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
)
1004# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({
1005 JSON_HEDLEY_DIAGNOSTIC_PUSH
1006 JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
1008 JSON_HEDLEY_DIAGNOSTIC_POP
1011# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr))
1014#if defined(JSON_HEDLEY_REINTERPRET_CAST)
1015#undef JSON_HEDLEY_REINTERPRET_CAST
1017#if defined(__cplusplus
)
1018#define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast<T>(expr))
1020#define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr))
1023#if defined(JSON_HEDLEY_STATIC_CAST)
1024#undef JSON_HEDLEY_STATIC_CAST
1026#if defined(__cplusplus
)
1027#define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast<T>(expr))
1029#define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr))
1032#if defined(JSON_HEDLEY_CPP_CAST)
1033#undef JSON_HEDLEY_CPP_CAST
1035#if defined(__cplusplus
)
1037# define JSON_HEDLEY_CPP_CAST(T, expr)
1038 JSON_HEDLEY_DIAGNOSTIC_PUSH
1039 _Pragma("clang diagnostic ignored \"-Wold-style-cast\"")
1041 JSON_HEDLEY_DIAGNOSTIC_POP
1042# elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,3
,0
)
1043# define JSON_HEDLEY_CPP_CAST(T, expr)
1044 JSON_HEDLEY_DIAGNOSTIC_PUSH
1045 _Pragma("diag_suppress=Pe137")
1046 JSON_HEDLEY_DIAGNOSTIC_POP
1048# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr))
1051# define JSON_HEDLEY_CPP_CAST(T, expr) (expr)
1054#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED)
1055#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
1058#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
1059#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
)
1060#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)")
1061#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1062#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786
))
1063#elif JSON_HEDLEY_PGI_VERSION_CHECK(20
,7
,0
)
1064#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445")
1065#elif JSON_HEDLEY_PGI_VERSION_CHECK(17
,10
,0
)
1066#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444")
1067#elif JSON_HEDLEY_GCC_VERSION_CHECK(4
,3
,0
)
1068#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
1069#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15
,0
,0
)
1070#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996
))
1071#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1072#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444")
1074 JSON_HEDLEY_TI_VERSION_CHECK(15
,12
,0
) ||
1075 (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4
,8
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1076 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5
,2
,0
) ||
1077 (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,0
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1078 JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,4
,0
) ||
1079 (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,0
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1080 JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,3
,0
) ||
1081 (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,2
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1082 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,5
,0
) ||
1083 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1084 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,1
,0
)
1085#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718")
1086#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,13
,0
) && !defined(__cplusplus)
1087#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)")
1088#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,13
,0
) && defined(__cplusplus)
1089#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)")
1090#elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,0
,0
)
1091#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215")
1092#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2
,90
,0
)
1093#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)")
1095#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
1098#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS)
1099#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
1102#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"")
1103#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
)
1104#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)")
1105#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1106#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161
))
1107#elif JSON_HEDLEY_PGI_VERSION_CHECK(17
,10
,0
)
1108#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675")
1109#elif JSON_HEDLEY_GCC_VERSION_CHECK(4
,3
,0
)
1110#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"")
1111#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15
,0
,0
)
1112#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068
))
1114 JSON_HEDLEY_TI_VERSION_CHECK(16
,9
,0
) ||
1115 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8
,0
,0
) ||
1116 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1117 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,3
,0
)
1118#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163")
1119#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8
,0
,0
)
1120#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163")
1121#elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,0
,0
)
1122#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161")
1123#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1124#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161")
1126#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
1129#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES)
1130#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
1133#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"")
1134#elif JSON_HEDLEY_GCC_VERSION_CHECK(4
,6
,0
)
1135#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
1136#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17
,0
,0
)
1137#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)")
1138#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1139#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292
))
1140#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19
,0
,0
)
1141#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030
))
1142#elif JSON_HEDLEY_PGI_VERSION_CHECK(20
,7
,0
)
1143#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098")
1144#elif JSON_HEDLEY_PGI_VERSION_CHECK(17
,10
,0
)
1145#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097")
1146#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,14
,0
) && defined(__cplusplus)
1147#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)")
1149 JSON_HEDLEY_TI_VERSION_CHECK(18
,1
,0
) ||
1150 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8
,3
,0
) ||
1151 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
)
1152#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173")
1153#elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,0
,0
)
1154#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097")
1155#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1156#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097")
1158#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
1161#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL)
1162#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
1165#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"")
1166#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
)
1167#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)")
1168#elif JSON_HEDLEY_GCC_VERSION_CHECK(3
,0
,0
)
1169#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"")
1171#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
1174#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION)
1175#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
1178#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"")
1179#elif JSON_HEDLEY_GCC_VERSION_CHECK(3
,4
,0
)
1180#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"")
1181#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1
,0
,0
)
1182#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505
))
1183#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1184#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142")
1186#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
1189#if defined(JSON_HEDLEY_DEPRECATED)
1190#undef JSON_HEDLEY_DEPRECATED
1192#if defined(JSON_HEDLEY_DEPRECATED_FOR)
1193#undef JSON_HEDLEY_DEPRECATED_FOR
1198#define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since))
1199#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement))
1201 (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) ||
1202 JSON_HEDLEY_GCC_VERSION_CHECK(4
,5
,0
) ||
1203 JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
) ||
1204 JSON_HEDLEY_ARM_VERSION_CHECK(5
,6
,0
) ||
1205 JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,13
,0
) ||
1206 JSON_HEDLEY_PGI_VERSION_CHECK(17
,10
,0
) ||
1207 JSON_HEDLEY_TI_VERSION_CHECK(18
,1
,0
) ||
1208 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18
,1
,0
) ||
1209 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8
,3
,0
) ||
1210 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1211 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,3
,0
) ||
1212 JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1213#define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since)))
1214#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement)))
1215#elif defined(__cplusplus) && (__cplusplus >= 201402L
)
1216#define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]])
1217#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]])
1219 JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) ||
1220 JSON_HEDLEY_GCC_VERSION_CHECK(3
,1
,0
) ||
1221 JSON_HEDLEY_ARM_VERSION_CHECK(4
,1
,0
) ||
1222 JSON_HEDLEY_TI_VERSION_CHECK(15
,12
,0
) ||
1223 (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4
,8
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1224 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5
,2
,0
) ||
1225 (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,0
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1226 JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,4
,0
) ||
1227 (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,0
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1228 JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,3
,0
) ||
1229 (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,2
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1230 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,5
,0
) ||
1231 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1232 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,1
,0
) ||
1233 JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
) ||
1234 JSON_HEDLEY_IAR_VERSION_CHECK(8
,10
,0
)
1235#define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__))
1236#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__))
1238 JSON_HEDLEY_MSVC_VERSION_CHECK(13
,10
,0
) ||
1239 JSON_HEDLEY_PELLES_VERSION_CHECK(6
,50
,0
) ||
1240 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1241#define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated)
1242#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated)
1243#elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,0
,0
)
1244#define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated")
1245#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated")
1247#define JSON_HEDLEY_DEPRECATED(since)
1248#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement)
1251#if defined(JSON_HEDLEY_UNAVAILABLE)
1252#undef JSON_HEDLEY_UNAVAILABLE
1259#define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since)))
1261#define JSON_HEDLEY_UNAVAILABLE(available_since)
1264#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT)
1265#undef JSON_HEDLEY_WARN_UNUSED_RESULT
1267#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG)
1268#undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG
1288#define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
1289#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__))
1290#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L
)
1291#define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1292#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]])
1293#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard)
1294#define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1295#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1296#elif defined(_Check_return_)
1297#define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_
1298#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_
1300#define JSON_HEDLEY_WARN_UNUSED_RESULT
1301#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)
1304#if defined(JSON_HEDLEY_SENTINEL)
1305#undef JSON_HEDLEY_SENTINEL
1313#define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position)))
1315#define JSON_HEDLEY_SENTINEL(position)
1318#if defined(JSON_HEDLEY_NO_RETURN)
1319#undef JSON_HEDLEY_NO_RETURN
1322#define JSON_HEDLEY_NO_RETURN __noreturn
1326#define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))
1327#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
1328#define JSON_HEDLEY_NO_RETURN _Noreturn
1329#elif defined(__cplusplus
) && (__cplusplus
>= 201103L
)
1330#define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]])
1332 JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) ||
1333 JSON_HEDLEY_GCC_VERSION_CHECK(3
,2
,0
) ||
1334 JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,11
,0
) ||
1335 JSON_HEDLEY_ARM_VERSION_CHECK(4
,1
,0
) ||
1336 JSON_HEDLEY_IBM_VERSION_CHECK(10
,1
,0
) ||
1337 JSON_HEDLEY_TI_VERSION_CHECK(15
,12
,0
) ||
1338 (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4
,8
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1339 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5
,2
,0
) ||
1340 (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,0
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1341 JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,4
,0
) ||
1342 (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,0
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1343 JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,3
,0
) ||
1344 (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,2
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1345 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,5
,0
) ||
1346 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1347 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,1
,0
) ||
1348 JSON_HEDLEY_IAR_VERSION_CHECK(8
,10
,0
)
1349#define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))
1350#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,10
,0
)
1351#define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return")
1353 JSON_HEDLEY_MSVC_VERSION_CHECK(13
,10
,0
) ||
1354 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1355#define JSON_HEDLEY_NO_RETURN __declspec(noreturn)
1356#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6
,0
,0
) && defined(__cplusplus)
1357#define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;")
1358#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3
,2
,0
)
1359#define JSON_HEDLEY_NO_RETURN __attribute((noreturn))
1360#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9
,0
,0
)
1361#define JSON_HEDLEY_NO_RETURN __declspec(noreturn)
1363#define JSON_HEDLEY_NO_RETURN
1366#if defined(JSON_HEDLEY_NO_ESCAPE)
1367#undef JSON_HEDLEY_NO_ESCAPE
1370#define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__))
1372#define JSON_HEDLEY_NO_ESCAPE
1375#if defined(JSON_HEDLEY_UNREACHABLE)
1376#undef JSON_HEDLEY_UNREACHABLE
1378#if defined(JSON_HEDLEY_UNREACHABLE_RETURN)
1379#undef JSON_HEDLEY_UNREACHABLE_RETURN
1381#if defined(JSON_HEDLEY_ASSUME)
1382#undef JSON_HEDLEY_ASSUME
1388#define JSON_HEDLEY_ASSUME(expr) __assume(expr)
1389#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume)
1390#define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr)
1392 JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,2
,0
) ||
1393 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4
,0
,0
)
1394#if defined(__cplusplus)
1395#define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr)
1397#define JSON_HEDLEY_ASSUME(expr) _nassert(expr)
1408#define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable()
1409#elif defined(JSON_HEDLEY_ASSUME)
1410#define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0
)
1413#if defined(JSON_HEDLEY_UNREACHABLE)
1414#define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1
: (JSON_HEDLEY_UNREACHABLE(), 1
)))
1416#define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr)
1423#define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0
)), (value))
1425#define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE()
1428#define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value)
1431#define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0
)
1436#pragma clang diagnostic ignored "-Wpedantic"
1439#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
1442#if defined(__clang__
)
1443#pragma clang diagnostic ignored "-Wvariadic-macros"
1444#elif defined(JSON_HEDLEY_GCC_VERSION)
1445#pragma GCC diagnostic ignored "-Wvariadic-macros"
1448#if defined(JSON_HEDLEY_NON_NULL)
1449#undef JSON_HEDLEY_NON_NULL
1456#define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__)))
1458#define JSON_HEDLEY_NON_NULL(...)
1462#if defined(JSON_HEDLEY_PRINTF_FORMAT)
1463#undef JSON_HEDLEY_PRINTF_FORMAT
1466#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check)))
1468#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check)))
1487#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check)))
1488#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6
,0
,0
)
1489#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check))
1491#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)
1494#if defined(JSON_HEDLEY_CONSTEXPR)
1495#undef JSON_HEDLEY_CONSTEXPR
1497#if defined(__cplusplus
)
1498#if __cplusplus
>= 201103L
1499#define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr)
1503#define JSON_HEDLEY_CONSTEXPR
1506#if defined(JSON_HEDLEY_PREDICT)
1507#undef JSON_HEDLEY_PREDICT
1509#if defined(JSON_HEDLEY_LIKELY)
1510#undef JSON_HEDLEY_LIKELY
1512#if defined(JSON_HEDLEY_UNLIKELY)
1513#undef JSON_HEDLEY_UNLIKELY
1515#if defined(JSON_HEDLEY_UNPREDICTABLE)
1516#undef JSON_HEDLEY_UNPREDICTABLE
1519#define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr))
1525# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability))
1526# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1
, (probability))
1527# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0
, (probability))
1528# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1
)
1529# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0
)
1531 (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) ||
1532 JSON_HEDLEY_GCC_VERSION_CHECK(3
,0
,0
) ||
1533 JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
) ||
1534 (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,15
,0
) && defined(__cplusplus)) ||
1535 JSON_HEDLEY_ARM_VERSION_CHECK(4
,1
,0
) ||
1536 JSON_HEDLEY_IBM_VERSION_CHECK(10
,1
,0
) ||
1537 JSON_HEDLEY_TI_VERSION_CHECK(15
,12
,0
) ||
1538 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4
,7
,0
) ||
1539 JSON_HEDLEY_TI_CL430_VERSION_CHECK(3
,1
,0
) ||
1540 JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,1
,0
) ||
1541 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6
,1
,0
) ||
1542 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1543 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,1
,0
) ||
1544 JSON_HEDLEY_TINYC_VERSION_CHECK(0
,9
,27
) ||
1545 JSON_HEDLEY_CRAY_VERSION_CHECK(8
,1
,0
) ||
1546 JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1547# define JSON_HEDLEY_PREDICT(expr, expected, probability)
1548 (((probability) >= 0.9
) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)))
1549# define JSON_HEDLEY_PREDICT_TRUE(expr, probability)
1551 double hedley_probability_ = (probability);
1552 ((hedley_probability_ >= 0.9
) ? __builtin_expect(!!(expr), 1
) : ((hedley_probability_ <= 0.1
) ? __builtin_expect(!!(expr), 0
) : !!(expr)));
1554# define JSON_HEDLEY_PREDICT_FALSE(expr, probability)
1556 double hedley_probability_ = (probability);
1557 ((hedley_probability_ >= 0.9
) ? __builtin_expect(!!(expr), 0
) : ((hedley_probability_ <= 0.1
) ? __builtin_expect(!!(expr), 1
) : !!(expr)));
1559# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1
)
1560# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0
)
1562# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))
1563# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr))
1564# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr))
1565# define JSON_HEDLEY_LIKELY(expr) (!!(expr))
1566# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr))
1569#define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1
, 0.5
)
1572#if defined(JSON_HEDLEY_MALLOC)
1573#undef JSON_HEDLEY_MALLOC
1594#define JSON_HEDLEY_MALLOC __attribute__((__malloc__))
1595#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,10
,0
)
1596#define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory")
1598 JSON_HEDLEY_MSVC_VERSION_CHECK(14
,0
,0
) ||
1599 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1600#define JSON_HEDLEY_MALLOC __declspec(restrict)
1602#define JSON_HEDLEY_MALLOC
1605#if defined(JSON_HEDLEY_PURE)
1606#undef JSON_HEDLEY_PURE
1628# define JSON_HEDLEY_PURE __attribute__((__pure__))
1629#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,10
,0
)
1630# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data")
1631#elif defined(__cplusplus) &&
1633 JSON_HEDLEY_TI_CL430_VERSION_CHECK(2
,0
,1
) ||
1634 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4
,0
,0
) ||
1635 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
)
1637# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;")
1639# define JSON_HEDLEY_PURE
1642#if defined(JSON_HEDLEY_CONST)
1643#undef JSON_HEDLEY_CONST
1665#define JSON_HEDLEY_CONST __attribute__((__const__))
1667 JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,10
,0
)
1668#define JSON_HEDLEY_CONST _Pragma("no_side_effect")
1670#define JSON_HEDLEY_CONST JSON_HEDLEY_PURE
1673#if defined(JSON_HEDLEY_RESTRICT)
1674#undef JSON_HEDLEY_RESTRICT
1676#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L
) && !defined(__cplusplus
)
1677#define JSON_HEDLEY_RESTRICT restrict
1692 defined(__clang__
) ||
1694#define JSON_HEDLEY_RESTRICT __restrict
1695#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,3
,0
) && !defined(__cplusplus)
1696#define JSON_HEDLEY_RESTRICT _Restrict
1698#define JSON_HEDLEY_RESTRICT
1701#if defined(JSON_HEDLEY_INLINE)
1702#undef JSON_HEDLEY_INLINE
1705 (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L
)) ||
1706 (defined(__cplusplus
) && (__cplusplus
>= 199711L
))
1707#define JSON_HEDLEY_INLINE inline
1709 defined(JSON_HEDLEY_GCC_VERSION) ||
1710 JSON_HEDLEY_ARM_VERSION_CHECK(6
,2
,0
)
1711#define JSON_HEDLEY_INLINE __inline__
1713 JSON_HEDLEY_MSVC_VERSION_CHECK(12
,0
,0
) ||
1714 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
) ||
1715 JSON_HEDLEY_ARM_VERSION_CHECK(4
,1
,0
) ||
1716 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5
,1
,0
) ||
1717 JSON_HEDLEY_TI_CL430_VERSION_CHECK(3
,1
,0
) ||
1718 JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,2
,0
) ||
1719 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8
,0
,0
) ||
1720 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1721 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,1
,0
) ||
1722 JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1723#define JSON_HEDLEY_INLINE __inline
1725#define JSON_HEDLEY_INLINE
1728#if defined(JSON_HEDLEY_ALWAYS_INLINE)
1729#undef JSON_HEDLEY_ALWAYS_INLINE
1751# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE
1753 JSON_HEDLEY_MSVC_VERSION_CHECK(12
,0
,0
) ||
1754 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1755# define JSON_HEDLEY_ALWAYS_INLINE __forceinline
1756#elif defined(__cplusplus) &&
1758 JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5
,2
,0
) ||
1759 JSON_HEDLEY_TI_CL430_VERSION_CHECK(4
,3
,0
) ||
1760 JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6
,4
,0
) ||
1761 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6
,1
,0
) ||
1762 JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1
,2
,0
) ||
1763 JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2
,1
,0
)
1765# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;")
1766#elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,0
,0
)
1767# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced")
1769# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE
1772#if defined(JSON_HEDLEY_NEVER_INLINE)
1773#undef JSON_HEDLEY_NEVER_INLINE
1795#define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__))
1797 JSON_HEDLEY_MSVC_VERSION_CHECK(13
,10
,0
) ||
1798 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
1799#define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)
1800#elif JSON_HEDLEY_PGI_VERSION_CHECK(10
,2
,0
)
1801#define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline")
1802#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6
,0
,0
) && defined(__cplusplus)
1803#define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;")
1804#elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,0
,0
)
1805#define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never")
1806#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3
,2
,0
)
1807#define JSON_HEDLEY_NEVER_INLINE __attribute((noinline))
1808#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9
,0
,0
)
1809#define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)
1811#define JSON_HEDLEY_NEVER_INLINE
1814#if defined(JSON_HEDLEY_PRIVATE)
1815#undef JSON_HEDLEY_PRIVATE
1817#if defined(JSON_HEDLEY_PUBLIC)
1818#undef JSON_HEDLEY_PUBLIC
1820#if defined(JSON_HEDLEY_IMPORT)
1821#undef JSON_HEDLEY_IMPORT
1823#if defined(_WIN32
) || defined(__CYGWIN__)
1824# define JSON_HEDLEY_PRIVATE
1825# define JSON_HEDLEY_PUBLIC __declspec(dllexport)
1826# define JSON_HEDLEY_IMPORT __declspec(dllimport)
1829 JSON_HEDLEY_HAS_ATTRIBUTE(visibility) ||
1830 JSON_HEDLEY_GCC_VERSION_CHECK(3
,3
,0
) ||
1831 JSON_HEDLEY_SUNPRO_VERSION_CHECK(5
,11
,0
) ||
1832 JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
) ||
1833 JSON_HEDLEY_ARM_VERSION_CHECK(4
,1
,0
) ||
1834 JSON_HEDLEY_IBM_VERSION_CHECK(13
,1
,0
) ||
1836 defined(__TI_EABI__) &&
1838 (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,2
,0
) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) ||
1839 JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7
,5
,0
)
1842 JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1
,25
,10
)
1843# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden")))
1844# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default")))
1846# define JSON_HEDLEY_PRIVATE
1847# define JSON_HEDLEY_PUBLIC
1849# define JSON_HEDLEY_IMPORT extern
1852#if defined(JSON_HEDLEY_NO_THROW)
1853#undef JSON_HEDLEY_NO_THROW
1860#define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__))
1862 JSON_HEDLEY_MSVC_VERSION_CHECK(13
,1
,0
) ||
1863 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
) ||
1864 JSON_HEDLEY_ARM_VERSION_CHECK(4
,1
,0
)
1865#define JSON_HEDLEY_NO_THROW __declspec(nothrow)
1867#define JSON_HEDLEY_NO_THROW
1870#if defined(JSON_HEDLEY_FALL_THROUGH)
1871#undef JSON_HEDLEY_FALL_THROUGH
1877#define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__))
1878#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough)
1879#define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])
1880#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)
1881#define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])
1882#elif defined(__fallthrough)
1883#define JSON_HEDLEY_FALL_THROUGH __fallthrough
1885#define JSON_HEDLEY_FALL_THROUGH
1888#if defined(JSON_HEDLEY_RETURNS_NON_NULL)
1889#undef JSON_HEDLEY_RETURNS_NON_NULL
1895#define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__))
1896#elif defined(_Ret_notnull_)
1897#define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_
1899#define JSON_HEDLEY_RETURNS_NON_NULL
1902#if defined(JSON_HEDLEY_ARRAY_PARAM)
1903#undef JSON_HEDLEY_ARRAY_PARAM
1906 defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L
) &&
1907 !defined(__STDC_NO_VLA__) &&
1908 !defined(__cplusplus
) &&
1909 !defined(JSON_HEDLEY_PGI_VERSION) &&
1910 !defined(JSON_HEDLEY_TINYC_VERSION)
1911#define JSON_HEDLEY_ARRAY_PARAM(name) (name)
1913#define JSON_HEDLEY_ARRAY_PARAM(name)
1916#if defined(JSON_HEDLEY_IS_CONSTANT)
1917#undef JSON_HEDLEY_IS_CONSTANT
1919#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR)
1920#undef JSON_HEDLEY_REQUIRE_CONSTEXPR
1923
1924#if defined(JSON_HEDLEY_IS_CONSTEXPR_)
1925#undef JSON_HEDLEY_IS_CONSTEXPR_
1938#define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr)
1940#if !defined(__cplusplus
)
1942 JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) ||
1943 JSON_HEDLEY_GCC_VERSION_CHECK(3
,4
,0
) ||
1944 JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
) ||
1945 JSON_HEDLEY_IBM_VERSION_CHECK(13
,1
,0
) ||
1946 JSON_HEDLEY_CRAY_VERSION_CHECK(8
,1
,0
) ||
1947 JSON_HEDLEY_ARM_VERSION_CHECK(5
,4
,0
) ||
1948 JSON_HEDLEY_TINYC_VERSION_CHECK(0
,9
,24
)
1949#if defined(__INTPTR_TYPE__)
1950#define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1
? (void*) ((__INTPTR_TYPE__) ((expr) * 0
)) : (int*) 0
)), int*)
1953#define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1
? (void*) ((intptr_t) ((expr) * 0
)) : (int*) 0
)), int*)
1957 defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L
) &&
1958 !defined(JSON_HEDLEY_SUNPRO_VERSION) &&
1959 !defined(JSON_HEDLEY_PGI_VERSION) &&
1960 !defined(JSON_HEDLEY_IAR_VERSION)) ||
1961 (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) ||
1962 JSON_HEDLEY_GCC_VERSION_CHECK(4
,9
,0
) ||
1963 JSON_HEDLEY_INTEL_VERSION_CHECK(17
,0
,0
) ||
1964 JSON_HEDLEY_IBM_VERSION_CHECK(12
,1
,0
) ||
1965 JSON_HEDLEY_ARM_VERSION_CHECK(5
,3
,0
)
1966#if defined(__INTPTR_TYPE__)
1967#define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1
? (void*) ((__INTPTR_TYPE__) ((expr) * 0
)) : (int*) 0
), int*: 1
, void*: 0
)
1970#define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1
? (void*) ((intptr_t) * 0
) : (int*) 0
), int*: 1
, void*: 0
)
1973 defined(JSON_HEDLEY_GCC_VERSION) ||
1974 defined(JSON_HEDLEY_INTEL_VERSION) ||
1975 defined(JSON_HEDLEY_TINYC_VERSION) ||
1976 defined(JSON_HEDLEY_TI_ARMCL_VERSION) ||
1977 JSON_HEDLEY_TI_CL430_VERSION_CHECK(18
,12
,0
) ||
1978 defined(JSON_HEDLEY_TI_CL2000_VERSION) ||
1979 defined(JSON_HEDLEY_TI_CL6X_VERSION) ||
1980 defined(JSON_HEDLEY_TI_CL7X_VERSION) ||
1981 defined(JSON_HEDLEY_TI_CLPRU_VERSION) ||
1983# define JSON_HEDLEY_IS_CONSTEXPR_(expr) (
1987 ((void*) ((expr) * 0L
) ) : \
1988((struct{ char v[sizeof(void) * 2]; } *) 1)
1994#if defined(JSON_HEDLEY_IS_CONSTEXPR_)
1995#if !defined(JSON_HEDLEY_IS_CONSTANT)
1996#define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr)
1998#define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1
))
2001#define JSON_HEDLEY_IS_CONSTANT(expr) (0
)
2003#define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr)
2006#if defined(JSON_HEDLEY_BEGIN_C_DECLS)
2007#undef JSON_HEDLEY_BEGIN_C_DECLS
2009#if defined(JSON_HEDLEY_END_C_DECLS)
2010#undef JSON_HEDLEY_END_C_DECLS
2012#if defined(JSON_HEDLEY_C_DECL)
2013#undef JSON_HEDLEY_C_DECL
2015#if defined(__cplusplus
)
2016#define JSON_HEDLEY_BEGIN_C_DECLS extern "C" {
2017#define JSON_HEDLEY_END_C_DECLS }
2018#define JSON_HEDLEY_C_DECL extern "C"
2020#define JSON_HEDLEY_BEGIN_C_DECLS
2021#define JSON_HEDLEY_END_C_DECLS
2022#define JSON_HEDLEY_C_DECL
2025#if defined(JSON_HEDLEY_STATIC_ASSERT)
2026#undef JSON_HEDLEY_STATIC_ASSERT
2029 !defined(__cplusplus
) && (
2030 (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L
)) ||
2034 defined(_Static_assert)
2036# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message)
2038 (defined(__cplusplus
) && (__cplusplus
>= 201103L
)) ||
2041# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message))
2043# define JSON_HEDLEY_STATIC_ASSERT(expr, message)
2046#if defined(JSON_HEDLEY_NULL)
2047#undef JSON_HEDLEY_NULL
2049#if defined(__cplusplus
)
2050#if __cplusplus
>= 201103L
2051#define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr)
2053#define JSON_HEDLEY_NULL NULL
2055#define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0
)
2058#define JSON_HEDLEY_NULL NULL
2060#define JSON_HEDLEY_NULL ((void*) 0
)
2063#if defined(JSON_HEDLEY_MESSAGE)
2064#undef JSON_HEDLEY_MESSAGE
2067# define JSON_HEDLEY_MESSAGE(msg)
2068 JSON_HEDLEY_DIAGNOSTIC_PUSH
2069 JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
2071 JSON_HEDLEY_DIAGNOSTIC_POP
2073 JSON_HEDLEY_GCC_VERSION_CHECK(4
,4
,0
) ||
2074 JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
)
2075# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg)
2076#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5
,0
,0
)
2077# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg)
2078#elif JSON_HEDLEY_IAR_VERSION_CHECK(8
,0
,0
)
2079# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))
2080#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2
,0
,0
)
2081# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))
2083# define JSON_HEDLEY_MESSAGE(msg)
2086#if defined(JSON_HEDLEY_WARNING)
2087#undef JSON_HEDLEY_WARNING
2090# define JSON_HEDLEY_WARNING(msg)
2091 JSON_HEDLEY_DIAGNOSTIC_PUSH
2092 JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
2094 JSON_HEDLEY_DIAGNOSTIC_POP
2096 JSON_HEDLEY_GCC_VERSION_CHECK(4
,8
,0
) ||
2097 JSON_HEDLEY_PGI_VERSION_CHECK(18
,4
,0
) ||
2098 JSON_HEDLEY_INTEL_VERSION_CHECK(13
,0
,0
)
2099# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg)
2101 JSON_HEDLEY_MSVC_VERSION_CHECK(15
,0
,0
) ||
2102 JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021
,1
,0
)
2103# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg))
2105# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg)
2108#if defined(JSON_HEDLEY_REQUIRE)
2109#undef JSON_HEDLEY_REQUIRE
2111#if defined(JSON_HEDLEY_REQUIRE_MSG)
2112#undef JSON_HEDLEY_REQUIRE_MSG
2116# define JSON_HEDLEY_REQUIRE(expr)
2117 JSON_HEDLEY_DIAGNOSTIC_PUSH
2118 _Pragma("clang diagnostic ignored \"-Wgcc-compat\"")
2119 __attribute__((diagnose_if(!(expr), #expr, "error")))
2120 JSON_HEDLEY_DIAGNOSTIC_POP
2121# define JSON_HEDLEY_REQUIRE_MSG(expr,msg)
2122 JSON_HEDLEY_DIAGNOSTIC_PUSH
2123 _Pragma("clang diagnostic ignored \"-Wgcc-compat\"")
2124 __attribute__((diagnose_if(!(expr), msg, "error")))
2125 JSON_HEDLEY_DIAGNOSTIC_POP
2127# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error")))
2128# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error")))
2131# define JSON_HEDLEY_REQUIRE(expr)
2132# define JSON_HEDLEY_REQUIRE_MSG(expr,msg)
2135#if defined(JSON_HEDLEY_FLAGS)
2136#undef JSON_HEDLEY_FLAGS
2139#define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__))
2141#define JSON_HEDLEY_FLAGS
2144#if defined(JSON_HEDLEY_FLAGS_CAST)
2145#undef JSON_HEDLEY_FLAGS_CAST
2148# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({
2149 JSON_HEDLEY_DIAGNOSTIC_PUSH
2150 _Pragma("warning(disable:188)")
2152 JSON_HEDLEY_DIAGNOSTIC_POP
2155# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr)
2158#if defined(JSON_HEDLEY_EMPTY_BASES)
2159#undef JSON_HEDLEY_EMPTY_BASES
2164#define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases)
2166#define JSON_HEDLEY_EMPTY_BASES
2171#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK)
2172#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
2174#if defined(__clang__
)
2175#define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0
)
2177#define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
2180#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE)
2181#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE
2183#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
2185#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE)
2186#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
2188#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)
2190#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN)
2191#undef JSON_HEDLEY_CLANG_HAS_BUILTIN
2193#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin)
2195#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE)
2196#undef JSON_HEDLEY_CLANG_HAS_FEATURE
2198#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature)
2200#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION)
2201#undef JSON_HEDLEY_CLANG_HAS_EXTENSION
2203#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension)
2205#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE)
2206#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE
2208#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)
2210#if defined(JSON_HEDLEY_CLANG_HAS_WARNING)
2211#undef JSON_HEDLEY_CLANG_HAS_WARNING
2213#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning)
2222#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
2223#if defined(__clang__
)
2224#if (__clang_major__
* 10000
+ __clang_minor__
* 100
+ __clang_patchlevel__
) < 30400
2225#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers"
2227#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
2228#if (__GNUC__ * 10000
+ __GNUC_MINOR__ * 100
+ __GNUC_PATCHLEVEL__) < 40800
2229#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
2236#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11)
2237#if (defined(__cplusplus
) && __cplusplus
>= 202002L
) || (defined(_MSVC_LANG
) && _MSVC_LANG
>= 202002L
)
2238#define JSON_HAS_CPP_20
2239#define JSON_HAS_CPP_17
2240#define JSON_HAS_CPP_14
2241#elif (defined(__cplusplus
) && __cplusplus
>= 201703L
) || (defined(_HAS_CXX17
) && _HAS_CXX17
== 1
)
2242#define JSON_HAS_CPP_17
2243#define JSON_HAS_CPP_14
2244#elif (defined(__cplusplus
) && __cplusplus
>= 201402L
) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1
)
2245#define JSON_HAS_CPP_14
2248#define JSON_HAS_CPP_11
2252#if defined(__clang__
)
2253#pragma clang diagnostic push
2254#pragma clang diagnostic ignored "-Wdocumentation"
2255#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
2259#if (defined(__cpp_exceptions
) || defined(__EXCEPTIONS) || defined(_CPPUNWIND
)) && !defined(JSON_NOEXCEPTION)
2260#define JSON_THROW(exception) throw exception
2262#define JSON_CATCH(exception) catch(exception)
2263#define JSON_INTERNAL_CATCH(exception) catch(exception)
2266#define JSON_THROW(exception) std::abort()
2267#define JSON_TRY if(true)
2268#define JSON_CATCH(exception) if(false)
2269#define JSON_INTERNAL_CATCH(exception) if(false)
2273#if defined(JSON_THROW_USER)
2275#define JSON_THROW JSON_THROW_USER
2277#if defined(JSON_TRY_USER)
2279#define JSON_TRY JSON_TRY_USER
2281#if defined(JSON_CATCH_USER)
2283#define JSON_CATCH JSON_CATCH_USER
2284#undef JSON_INTERNAL_CATCH
2285#define JSON_INTERNAL_CATCH JSON_CATCH_USER
2287#if defined(JSON_INTERNAL_CATCH_USER)
2288#undef JSON_INTERNAL_CATCH
2289#define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER
2293#if !defined(JSON_ASSERT)
2295#define JSON_ASSERT(x) assert
(x)
2299#if defined(JSON_TESTS_PRIVATE)
2300#define JSON_PRIVATE_UNLESS_TESTED public
2302#define JSON_PRIVATE_UNLESS_TESTED private
2306
2307
2308
2309
2310#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...)
2311 template<typename BasicJsonType>
2312 inline void to_json(BasicJsonType& j, const ENUM_TYPE& e)
2314 static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!");
2315 static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__;
2316 auto it = std::find_if(std::begin(m), std::end(m),
2317 [e](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool
2319 return ej_pair.first == e;
2321 j = ((it != std::end(m)) ? it : std::begin(m))->second;
2323 template<typename BasicJsonType>
2324 inline void from_json(const BasicJsonType& j, ENUM_TYPE& e)
2326 static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!");
2327 static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__;
2328 auto it = std::find_if(std::begin(m), std::end(m),
2329 [&j](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool
2331 return ej_pair.second == j;
2333 e = ((it != std::end(m)) ? it : std::begin(m))->first;
2339#define NLOHMANN_BASIC_JSON_TPL_DECLARATION
2340 template<template<typename, typename, typename...> class ObjectType,
2341 template<typename, typename...> class ArrayType,
2342 class StringType, class BooleanType, class NumberIntegerType,
2343 class NumberUnsignedType, class NumberFloatType,
2344 template<typename> class AllocatorType,
2345 template<typename, typename = void> class JSONSerializer,
2348#define NLOHMANN_BASIC_JSON_TPL
2349 basic_json<ObjectType, ArrayType, StringType, BooleanType,
2350 NumberIntegerType, NumberUnsignedType, NumberFloatType,
2351 AllocatorType, JSONSerializer, BinaryType>
2355#define NLOHMANN_JSON_EXPAND( x ) x
2356#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME
2421 NLOHMANN_JSON_PASTE1)(__VA_ARGS__))
2422#define NLOHMANN_JSON_PASTE2(func, v1) func(v1)
2426#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5)
2427#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6)
2428#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7)
2429#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8)
2430#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9)
2431#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10)
2432#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11)
2433#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)
2434#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13)
2435#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14)
2436#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
2437#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16)
2438#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17)
2439#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18)
2440#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)
2441#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20)
2442#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21)
2443#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22)
2444#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23)
2445#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24)
2446#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25)
2447#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26)
2448#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27)
2449#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28)
2450#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29)
2451#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30)
2452#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31)
2453#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32)
2454#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33)
2455#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34)
2456#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35)
2457#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36)
2458#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37)
2459#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38)
2460#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39)
2461#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40)
2462#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41)
2463#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42)
2464#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43)
2465#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44)
2466#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45)
2467#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46)
2468#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47)
2469#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48)
2470#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49)
2471#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50)
2472#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51)
2473#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52)
2474#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53)
2475#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54)
2476#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55)
2477#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56)
2478#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57)
2479#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58)
2480#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59)
2481#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60)
2482#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61)
2483#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62)
2484#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63)
2486#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1;
2487#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1);
2490
2491
2492
2493
2494#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...)
2499
2500
2501
2502
2503#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...)
2507#ifndef JSON_USE_IMPLICIT_CONVERSIONS
2508#define JSON_USE_IMPLICIT_CONVERSIONS 1
2512#define JSON_EXPLICIT
2514#define JSON_EXPLICIT explicit
2517#ifndef JSON_DIAGNOSTICS
2518#define JSON_DIAGNOSTICS 0
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540 inline void replace_substring(
std::string& s,
const std::string& f,
2541 const std::string& t)
2544 for (
auto pos = s.find(f);
2545 pos != std::string::npos;
2546 s.replace(pos, f.size(), t),
2547 pos = s.find(f, pos + t.size()))
2553
2554
2555
2556
2557
2558
2561 replace_substring(s,
"~",
"~0");
2562 replace_substring(s,
"/",
"~1");
2567
2568
2569
2570
2571
2572
2573 static void unescape(
std::string& s)
2575 replace_substring(s,
"~1",
"/");
2576 replace_substring(s,
"~0",
"~");
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2654 const char*
what()
const noexcept override
2666 static std::string name(
const std::string& ename,
int id_)
2668 return "[json.exception." + ename +
"." +
std::to_string(id_) +
"] ";
2671 template<
typename BasicJsonType>
2672 static std::string diagnostics(
const BasicJsonType& leaf_element)
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2789
2790
2791
2792
2793
2794
2795
2796
2797 template<
typename BasicJsonType>
2805 template<
typename BasicJsonType>
2806 static parse_error create(
int id_,
std::size_t byte_,
const std::string& what_arg,
const BasicJsonType& context)
2815
2816
2817
2818
2819
2820
2821
2822
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2876 template<
typename BasicJsonType>
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2931 template<
typename BasicJsonType>
2932 static type_error create(
int id_,
const std::string& what_arg,
const BasicJsonType& context)
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2979 template<
typename BasicJsonType>
2980 static out_of_range create(
int id_,
const std::string& what_arg,
const BasicJsonType& context)
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3018 template<
typename BasicJsonType>
3019 static other_error create(
int id_,
const std::string& what_arg,
const BasicJsonType& context)
3038#include <type_traits>
3049 template<
typename T>
3050 using uncvref_t =
typename std::remove_cv<
typename std::remove_reference<T>::type>::type;
3052#ifdef JSON_HAS_CPP_14
3055 using std::enable_if_t;
3056 using std::index_sequence;
3057 using std::make_index_sequence;
3058 using std::index_sequence_for;
3063 template<
bool B,
typename T =
void>
3090 template <
typename T,
T...
Ints>
3096 return sizeof...(
Ints);
3136 template <
typename T>
3151 template <
typename T,
T N>
3167 template <
typename...
Ts>
3179 template<
typename T>
3185 template<
typename T>
3207#include <type_traits>
3227 template<
typename ...Ts>
using void_t =
typename make_void<Ts...>::type;
3238 template<
typename It,
typename =
void>
3241 template<
typename It>
3256 template<
typename T,
typename =
void>
3261 template<
typename T>
3267 template<
typename T>
3286#include <type_traits>
3306 template<
class Default,
3308 template<
class...>
class Op,
3312 using value_t =
std::false_type;
3313 using type = Default;
3316 template<
class Default,
template<
class...>
class Op,
class...
Args>
3323 template<
template<
class...>
class Op,
class...
Args>
3326 template<
template<
class...>
class Op,
class... Args>
3329 template<
template<
class...>
class Op,
class...
Args>
3332 template<
class Default,
template<
class...>
class Op,
class...
Args>
3335 template<
class Default,
template<
class...>
class Op,
class...
Args>
3338 template<
class Expected,
template<
class...>
class Op,
class...
Args>
3341 template<
class To,
template<
class...>
class Op,
class...
Args>
3348#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
3349#define INCLUDE_NLOHMANN_JSON_FWD_HPP_
3358
3359
3360
3361
3365
3366
3367
3368
3369
3370
3371 template<
typename T =
void,
typename SFINAE =
void>
3372 struct adl_serializer;
3374 template<
template<
typename U,
typename V,
typename... Args>
class ObjectType =
3376 template<
typename U,
typename... Args>
class ArrayType =
std::
vector,
3377 class StringType =
std::
string,
class BooleanType =
bool,
3380 class NumberFloatType =
double,
3381 template<
typename U>
class AllocatorType =
std::
allocator,
3382 template<
typename T,
typename SFINAE =
void>
class JSONSerializer =
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398 template<
typename BasicJsonType>
3402
3403
3404
3405
3406
3407
3408
3411 template<
class Key,
class T,
class IgnoredLess,
class Allocator>
3415
3416
3417
3418
3419
3420
3431
3432
3433
3434
3435
3436
3437
3468 template<
typename T>
3475 template<
typename T>
3476 using mapped_type_t =
typename T::mapped_type;
3478 template<
typename T>
3479 using key_type_t =
typename T::key_type;
3481 template<
typename T>
3482 using value_type_t =
typename T::value_type;
3484 template<
typename T>
3485 using difference_type_t =
typename T::difference_type;
3487 template<
typename T>
3488 using pointer_t =
typename T::pointer;
3490 template<
typename T>
3491 using reference_t =
typename T::reference;
3493 template<
typename T>
3494 using iterator_category_t =
typename T::iterator_category;
3496 template<
typename T>
3497 using iterator_t =
typename T::iterator;
3499 template<
typename T,
typename... Args>
3500 using to_json_function =
decltype(T::to_json(
std::declval<Args>()...));
3502 template<
typename T,
typename... Args>
3503 using from_json_function =
decltype(T::from_json(
std::declval<Args>()...));
3505 template<
typename T,
typename U>
3506 using get_template_function =
decltype(
std::declval<T>().
template get<U>());
3509 template<
typename BasicJsonType,
typename T,
typename =
void>
3516 template <
typename BasicJsonType,
typename T>
3534 template<
typename BasicJsonType,
typename T,
typename =
void>
3549 template<
typename BasicJsonType,
typename T,
typename =
void>
3570 template<
class B1,
class... Bn>
3572 :
std::conditional<
bool(B1::value),
conjunction<Bn...>, B1>::type {};
3580 template <
typename T>
3583 template <
typename T1,
typename T2>
3587 template <
typename T1,
typename T2>
3591 template <
typename... Ts>
3595 template <
typename... Ts>
3600 template <
typename T,
typename... Args>
3603 template <
typename T1,
typename T2>
3606 template <
typename T1,
typename T2>
3609 template <
typename... Ts>
3612 template <
typename... Ts>
3616 template<
typename T,
typename =
void>
3619 template<
typename T>
3638 template<
typename T,
typename =
void>
3641 template<
typename T>
3644 template<
typename BasicJsonType,
typename CompatibleObjectType,
3664 template<
typename BasicJsonType,
typename CompatibleObjectType>
3668 template<
typename BasicJsonType,
typename ConstructibleObjectType,
3696 template<
typename BasicJsonType,
typename ConstructibleObjectType>
3701 template<
typename BasicJsonType,
typename CompatibleStringType,
3715 template<
typename BasicJsonType,
typename ConstructibleStringType>
3719 template<
typename BasicJsonType,
typename ConstructibleStringType,
3734 template<
typename BasicJsonType,
typename ConstructibleStringType>
3738 template<
typename BasicJsonType,
typename CompatibleArrayType,
typename =
void>
3757 template<
typename BasicJsonType,
typename CompatibleArrayType>
3761 template<
typename BasicJsonType,
typename ConstructibleArrayType,
typename =
void>
3800 template<
typename BasicJsonType,
typename ConstructibleArrayType>
3804 template<
typename RealIntegerType,
typename CompatibleNumberIntegerType,
3826 template<
typename RealIntegerType,
typename CompatibleNumberIntegerType>
3831 template<
typename BasicJsonType,
typename CompatibleType,
typename =
void>
3843 template<
typename BasicJsonType,
typename CompatibleType>
3847 template<
typename T1,
typename T2>
3850 template<
typename T1,
typename... Args>
3855 template <
typename T>
3865 template <
typename C>
static one
test(
decltype(&C::capacity));
3868 enum {
value =
sizeof(test<T>(
nullptr)) ==
sizeof(
char) };
3872 template <
typename T,
typename U, enable_if_t < !std::is_same<T, U>::value,
int > = 0 >
3873 T conditional_static_cast(U value)
3875 return static_cast<
T>(
value);
3878 template<
typename T,
typename U, enable_if_t<std::is_same<T, U>::value,
int> = 0>
3879 T conditional_static_cast(U value)
3894 template<
typename BasicJsonType>
3905 template <
typename BasicJsonType,
typename ArithmeticType,
3906 enable_if_t < std::is_arithmetic<ArithmeticType>::value &&
3907 !std::is_same<ArithmeticType,
typename BasicJsonType::boolean_t>::value,
3909 void get_arithmetic_value(
const BasicJsonType& j, ArithmeticType& val)
3941 template<
typename BasicJsonType>
3942 void from_json(
const BasicJsonType& j,
typename BasicJsonType::boolean_t& b)
3951 template<
typename BasicJsonType>
3952 void from_json(
const BasicJsonType& j,
typename BasicJsonType::string_t& s)
3962 typename BasicJsonType,
typename ConstructibleStringType,
3964 is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value &&
3965 !std::is_same<
typename BasicJsonType::string_t,
3966 ConstructibleStringType>::value,
3968 void from_json(
const BasicJsonType& j, ConstructibleStringType& s)
3978 template<
typename BasicJsonType>
3979 void from_json(
const BasicJsonType& j,
typename BasicJsonType::number_float_t& val)
3984 template<
typename BasicJsonType>
3985 void from_json(
const BasicJsonType& j,
typename BasicJsonType::number_unsigned_t& val)
3990 template<
typename BasicJsonType>
3991 void from_json(
const BasicJsonType& j,
typename BasicJsonType::number_integer_t& val)
3996 template<
typename BasicJsonType,
typename EnumType,
3997 enable_if_t<std::is_enum<EnumType>::value,
int> = 0>
3998 void from_json(
const BasicJsonType& j, EnumType& e)
4006 template<
typename BasicJsonType,
typename T,
typename Allocator,
4007 enable_if_t<is_getable<BasicJsonType, T>::value,
int> = 0>
4008 void from_json(
const BasicJsonType& j,
std::forward_list<T, Allocator>& l)
4018 return i.
template get<
T>();
4023 template<
typename BasicJsonType,
typename T,
4024 enable_if_t<is_getable<BasicJsonType, T>::value,
int> = 0>
4025 void from_json(
const BasicJsonType& j,
std::valarray<T>& l)
4039 template<
typename BasicJsonType,
typename T,
std::size_t N>
4040 auto from_json(
const BasicJsonType& j, T(&arr)[N])
4041 ->
decltype(j.
template get<T>(),
void())
4049 template<
typename BasicJsonType>
4050 void from_json_array_impl(
const BasicJsonType& j,
typename BasicJsonType::array_t& arr,
priority_tag<3> )
4055 template<
typename BasicJsonType,
typename T,
std::size_t N>
4056 auto from_json_array_impl(
const BasicJsonType& j,
std::array<T, N>& arr,
4058 ->
decltype(j.
template get<T>(),
void())
4066 template<
typename BasicJsonType,
typename ConstructibleArrayType,
4068 std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value,
4070 auto from_json_array_impl(
const BasicJsonType& j, ConstructibleArrayType& arr,
priority_tag<1> )
4072 arr.reserve(
std::declval<
typename ConstructibleArrayType::size_type>()),
4073 j.
template get<
typename ConstructibleArrayType::value_type>(),
4090 template<
typename BasicJsonType,
typename ConstructibleArrayType,
4092 std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value,
4094 void from_json_array_impl(
const BasicJsonType& j, ConstructibleArrayType& arr,
4111 template <
typename BasicJsonType,
typename ConstructibleArrayType,
4113 is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value &&
4114 !is_constructible_object_type<BasicJsonType, ConstructibleArrayType>::value &&
4115 !is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value &&
4116 !std::is_same<ConstructibleArrayType,
typename BasicJsonType::binary_t>::value &&
4117 !is_basic_json<ConstructibleArrayType>::value,
4132 template <
typename BasicJsonType,
typename T,
std::size_t... Idx >
4133 std::array<T,
sizeof...(Idx)> from_json_inplace_array_impl(BasicJsonType&& j,
4134 identity_tag<
std::array<T,
sizeof...(Idx)>> , index_sequence<Idx...> )
4139 template <
typename BasicJsonType,
typename T,
std::size_t N >
4151 template<
typename BasicJsonType>
4152 void from_json(
const BasicJsonType& j,
typename BasicJsonType::binary_t& bin)
4162 template<
typename BasicJsonType,
typename ConstructibleObjectType,
4163 enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value,
int> = 0>
4164 void from_json(
const BasicJsonType& j, ConstructibleObjectType& obj)
4188 template <
typename BasicJsonType,
typename ArithmeticType,
4190 std::is_arithmetic<ArithmeticType>::value &&
4191 !std::is_same<ArithmeticType,
typename BasicJsonType::number_unsigned_t>::value &&
4192 !std::is_same<ArithmeticType,
typename BasicJsonType::number_integer_t>::value &&
4193 !std::is_same<ArithmeticType,
typename BasicJsonType::number_float_t>::value &&
4194 !std::is_same<ArithmeticType,
typename BasicJsonType::boolean_t>::value,
4196 void from_json(
const BasicJsonType& j, ArithmeticType& val)
4232 template<
typename BasicJsonType,
typename... Args,
std::size_t... Idx>
4233 std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> )
4238 template <
typename BasicJsonType,
class A1,
class A2 >
4245 template<
typename BasicJsonType,
typename A1,
typename A2>
4251 template<
typename BasicJsonType,
typename... Args>
4257 template<
typename BasicJsonType,
typename... Args>
4263 template<
typename BasicJsonType,
typename TupleRelated>
4275 template <
typename BasicJsonType,
typename Key,
typename Value,
typename Compare,
typename Allocator,
4276 typename = enable_if_t < !std::is_constructible <
4277 typename BasicJsonType::string_t, Key >::value >>
4278 void from_json(
const BasicJsonType& j,
std::map<Key, Value, Compare, Allocator>& m)
4285 for (
const auto&
p :
j)
4295 template <
typename BasicJsonType,
typename Key,
typename Value,
typename Hash,
typename KeyEqual,
typename Allocator,
4296 typename = enable_if_t < !std::is_constructible <
4297 typename BasicJsonType::string_t, Key >::value >>
4298 void from_json(
const BasicJsonType& j,
std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>& m)
4305 for (
const auto&
p :
j)
4317 template<
typename BasicJsonType,
typename T>
4318 auto operator()(
const BasicJsonType& j, T&& val)
const
4319 noexcept(
noexcept(from_json(j, std::forward<T>(val))))
4320 ->
decltype(from_json(j,
std::forward<T>(val)))
4322 return from_json(j, std::forward<T>(val));
4343#include <type_traits>
4366 template<
typename string_type>
4376 using difference_type =
std::ptrdiff_t;
4378 using pointer = value_type*;
4379 using reference = value_type&;
4380 using iterator_category =
std::input_iterator_tag;
4381 using string_type =
typename std::remove_cv<
typename std::remove_reference<
decltype(
std::declval<IteratorType>().key()) >::type >::type;
4428 const string_type&
key()
const
4497 template<
std::size_t N,
typename IteratorType, enable_if_t<N == 0,
int> = 0>
4505 template<
std::size_t N,
typename IteratorType, enable_if_t<N == 1,
int> = 0>
4519#if defined(__clang__
)
4521#pragma clang diagnostic push
4522#pragma clang diagnostic ignored "-Wmismatched-tags"
4524 template<
typename IteratorType>
4526 :
public std::integral_constant<std::size_t, 2> {};
4528 template<
std::size_t N,
typename IteratorType>
4532 using type =
decltype(
4533 get<N>(
std::declval <
4536#if defined(__clang__
)
4537#pragma clang diagnostic pop
4557
4558
4559
4560
4561
4568 template<
typename BasicJsonType>
4569 static void construct(BasicJsonType& j,
typename BasicJsonType::boolean_t b)
noexcept
4581 template<
typename BasicJsonType>
4582 static void construct(BasicJsonType& j,
const typename BasicJsonType::string_t& s)
4590 template<
typename BasicJsonType>
4591 static void construct(BasicJsonType& j,
typename BasicJsonType::string_t&& s)
4599 template <
typename BasicJsonType,
typename CompatibleStringType,
4600 enable_if_t < !std::is_same<CompatibleStringType,
typename BasicJsonType::string_t>::value,
4602 static void construct(BasicJsonType& j,
const CompatibleStringType& str)
4614 template<
typename BasicJsonType>
4615 static void construct(BasicJsonType& j,
const typename BasicJsonType::binary_t& b)
4623 template<
typename BasicJsonType>
4624 static void construct(BasicJsonType& j,
typename BasicJsonType::binary_t&& b)
4636 template<
typename BasicJsonType>
4637 static void construct(BasicJsonType& j,
typename BasicJsonType::number_float_t val)
noexcept
4649 template<
typename BasicJsonType>
4650 static void construct(BasicJsonType& j,
typename BasicJsonType::number_unsigned_t val)
noexcept
4662 template<
typename BasicJsonType>
4663 static void construct(BasicJsonType& j,
typename BasicJsonType::number_integer_t val)
noexcept
4675 template<
typename BasicJsonType>
4676 static void construct(BasicJsonType& j,
const typename BasicJsonType::array_t& arr)
4685 template<
typename BasicJsonType>
4686 static void construct(BasicJsonType& j,
typename BasicJsonType::array_t&& arr)
4695 template <
typename BasicJsonType,
typename CompatibleArrayType,
4696 enable_if_t < !std::is_same<CompatibleArrayType,
typename BasicJsonType::array_t>::value,
4698 static void construct(BasicJsonType& j,
const CompatibleArrayType& arr)
4710 template<
typename BasicJsonType>
4711 static void construct(BasicJsonType& j,
const std::vector<
bool>& arr)
4717 for (
const bool x :
arr)
4725 template<
typename BasicJsonType,
typename T,
4726 enable_if_t<std::is_convertible<T, BasicJsonType>::value,
int> = 0>
4727 static void construct(BasicJsonType& j,
const std::valarray<T>& arr)
4745 template<
typename BasicJsonType>
4746 static void construct(BasicJsonType& j,
const typename BasicJsonType::object_t& obj)
4755 template<
typename BasicJsonType>
4756 static void construct(BasicJsonType& j,
typename BasicJsonType::object_t&& obj)
4765 template <
typename BasicJsonType,
typename CompatibleObjectType,
4766 enable_if_t < !std::is_same<CompatibleObjectType,
typename BasicJsonType::object_t>::value,
int > = 0 >
4767 static void construct(BasicJsonType& j,
const CompatibleObjectType& obj)
4784 template<
typename BasicJsonType,
typename T,
4785 enable_if_t<std::is_same<T,
typename BasicJsonType::boolean_t>::value,
int> = 0>
4786 void to_json(BasicJsonType& j, T b)
noexcept
4791 template<
typename BasicJsonType,
typename CompatibleString,
4792 enable_if_t<std::is_constructible<
typename BasicJsonType::string_t, CompatibleString>::value,
int> = 0>
4793 void to_json(BasicJsonType& j,
const CompatibleString& s)
4798 template<
typename BasicJsonType>
4799 void to_json(BasicJsonType& j,
typename BasicJsonType::string_t&& s)
4804 template<
typename BasicJsonType,
typename FloatType,
4805 enable_if_t<std::is_floating_point<FloatType>::value,
int> = 0>
4806 void to_json(BasicJsonType& j, FloatType val)
noexcept
4811 template<
typename BasicJsonType,
typename CompatibleNumberUnsignedType,
4812 enable_if_t<is_compatible_integer_type<
typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value,
int> = 0>
4813 void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val)
noexcept
4818 template<
typename BasicJsonType,
typename CompatibleNumberIntegerType,
4819 enable_if_t<is_compatible_integer_type<
typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value,
int> = 0>
4820 void to_json(BasicJsonType& j, CompatibleNumberIntegerType val)
noexcept
4825 template<
typename BasicJsonType,
typename EnumType,
4826 enable_if_t<std::is_enum<EnumType>::value,
int> = 0>
4827 void to_json(BasicJsonType& j, EnumType e)
noexcept
4833 template<
typename BasicJsonType>
4834 void to_json(BasicJsonType& j,
const std::vector<
bool>& e)
4839 template <
typename BasicJsonType,
typename CompatibleArrayType,
4840 enable_if_t < is_compatible_array_type<BasicJsonType,
4841 CompatibleArrayType>::value &&
4842 !is_compatible_object_type<BasicJsonType, CompatibleArrayType>::value &&
4843 !is_compatible_string_type<BasicJsonType, CompatibleArrayType>::value &&
4844 !std::is_same<
typename BasicJsonType::binary_t, CompatibleArrayType>::value &&
4845 !is_basic_json<CompatibleArrayType>::value,
4847 void to_json(BasicJsonType& j,
const CompatibleArrayType& arr)
4852 template<
typename BasicJsonType>
4853 void to_json(BasicJsonType& j,
const typename BasicJsonType::binary_t& bin)
4858 template<
typename BasicJsonType,
typename T,
4859 enable_if_t<std::is_convertible<T, BasicJsonType>::value,
int> = 0>
4860 void to_json(BasicJsonType& j,
const std::valarray<T>& arr)
4865 template<
typename BasicJsonType>
4866 void to_json(BasicJsonType& j,
typename BasicJsonType::array_t&& arr)
4871 template <
typename BasicJsonType,
typename CompatibleObjectType,
4872 enable_if_t < is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value && !is_basic_json<CompatibleObjectType>::value,
int > = 0 >
4873 void to_json(BasicJsonType& j,
const CompatibleObjectType& obj)
4878 template<
typename BasicJsonType>
4879 void to_json(BasicJsonType& j,
typename BasicJsonType::object_t&& obj)
4885 typename BasicJsonType,
typename T,
std::size_t N,
4886 enable_if_t < !std::is_constructible<
typename BasicJsonType::string_t,
4887 const T(&)[N]>::value,
4889 void to_json(BasicJsonType& j,
const T(&arr)[N])
4894 template <
typename BasicJsonType,
typename T1,
typename T2, enable_if_t < std::is_constructible<BasicJsonType, T1>::value&& std::is_constructible<BasicJsonType, T2>::value,
int > = 0 >
4895 void to_json(BasicJsonType& j,
const std::pair<T1, T2>& p)
4901 template<
typename BasicJsonType,
typename T,
4902 enable_if_t<std::is_same<T, iteration_proxy_value<
typename BasicJsonType::iterator>>::value,
int> = 0>
4903 void to_json(BasicJsonType& j,
const T& b)
4908 template<
typename BasicJsonType,
typename Tuple,
std::size_t... Idx>
4909 void to_json_tuple_impl(BasicJsonType& j,
const Tuple& t, index_sequence<Idx...> )
4914 template<
typename BasicJsonType,
typename T, enable_if_t<is_constructible_tuple<BasicJsonType, T>::value,
int > = 0>
4915 void to_json(BasicJsonType& j,
const T& t)
4922 template<
typename BasicJsonType,
typename T>
4923 auto operator()(BasicJsonType& j, T&& val)
const noexcept(
noexcept(to_json(j, std::forward<T>(val))))
4924 ->
decltype(to_json(j,
std::forward<T>(val)),
void())
4926 return to_json(j, std::forward<T>(val));
4948 template<
typename ValueType,
typename>
4949 struct adl_serializer
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962 template<
typename BasicJsonType,
typename TargetType = ValueType>
4963 static auto from_json(BasicJsonType&& j, TargetType& val)
noexcept(
4964 noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val)))
4965 ->
decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val),
void())
4967 ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982 template<
typename BasicJsonType,
typename TargetType = ValueType>
4984 noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})))
4985 ->
decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))
4987 return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {});
4991
4992
4993
4994
4995
4996
4997
4998
4999 template<
typename BasicJsonType,
typename TargetType = ValueType>
5000 static auto to_json(BasicJsonType& j, TargetType&& val)
noexcept(
5001 noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val))))
5002 ->
decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)),
void())
5004 ::nlohmann::to_json(j, std::forward<TargetType>(val));
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032 template<
typename BinaryType>
5037 using container_type = BinaryType;
5039 using subtype_type =
std::uint64_t;
5073 return !(
rhs == *
this);
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5191#include <functional>
5206 seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U);
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221 template<
typename BasicJsonType>
5268 const auto h =
std::
hash<
bool>{}(
j.
template get<
bool>());
5340#include <type_traits>
5366
5367
5368
5372 using char_type =
char;
5386 std::char_traits<
char>::int_type get_character()
noexcept
5388 return std::fgetc(m_file);
5398
5399
5400
5401
5402
5403
5404
5405
5409 using char_type =
char;
5417 is->clear(is->rdstate() & std::ios::eofbit);
5421 explicit input_stream_adapter(
std::istream& i)
5422 : is(&i), sb(i.rdbuf())
5431 : is(rhs.is),
sb(rhs
.sb)
5440 std::char_traits<
char>::int_type get_character()
5442 auto res = sb->sbumpc();
5446 is->clear(is->rdstate() | std::ios::eofbit);
5460 template<
typename IteratorType>
5464 using char_type =
typename std::iterator_traits<IteratorType>::value_type;
5470 typename std::char_traits<char_type>::int_type get_character()
5483 IteratorType current;
5486 template<
typename BaseInputAdapter, size_t T>
5496 template<
typename BaseInputAdapter, size_t T>
5499 template<
typename BaseInputAdapter>
5503 static void fill_buffer(BaseInputAdapter& input,
5504 std::array<
std::char_traits<
char>::int_type, 4>& utf8_bytes,
5505 size_t& utf8_bytes_index,
5506 size_t& utf8_bytes_filled)
5526 else if (
wc <= 0x7FF)
5532 else if (
wc <= 0xFFFF)
5539 else if (
wc <= 0x10FFFF)
5557 template<
typename BaseInputAdapter>
5561 static void fill_buffer(BaseInputAdapter& input,
5562 std::array<
std::char_traits<
char>::int_type, 4>& utf8_bytes,
5563 size_t& utf8_bytes_index,
5564 size_t& utf8_bytes_filled)
5584 else if (
wc <= 0x7FF)
5590 else if (0xD800 >
wc ||
wc >= 0xE000)
5602 const auto charcode = 0x10000u + (((
static_cast<
unsigned int>(
wc) & 0x3FFu) << 10u) | (
wc2 & 0x3FFu));
5620 template<
typename BaseInputAdapter,
typename WideCharType>
5624 using char_type =
char;
5629 typename std::char_traits<
char>::int_type get_character()
noexcept
5647 BaseInputAdapter base_adapter;
5656 std::array<
std::char_traits<
char>::int_type, 4> utf8_bytes = { {0, 0, 0, 0} };
5665 template<
typename IteratorType,
typename Enable =
void>
5668 using iterator_type = IteratorType;
5669 using char_type =
typename std::iterator_traits<iterator_type>::value_type;
5672 static adapter_type
create(IteratorType first, IteratorType last)
5678 template<
typename T>
5681 using value_type =
typename std::iterator_traits<T>::value_type;
5684 value =
sizeof(value_type) > 1
5703 template<
typename IteratorType>
5704 typename iterator_input_adapter_factory<IteratorType>::adapter_type input_adapter(IteratorType first, IteratorType last)
5720 template<
typename ContainerType,
typename Enable =
void>
5737 template<
typename ContainerType>
5738 typename container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::adapter_type input_adapter(
const ContainerType& container)
5764 template <
typename CharT,
5765 typename std::enable_if <
5766 std::is_pointer<CharT>::value &&
5767 !
std::is_array<CharT>::value&&
5768 std::is_integral<
typename std::remove_pointer<CharT>::type>::value &&
5769 sizeof(
typename std::remove_pointer<CharT>::type) == 1,
5771 contiguous_bytes_input_adapter input_adapter(CharT b)
5774 const auto*
ptr =
reinterpret_cast<
const char*>(
b);
5778 template<
typename T,
std::size_t N>
5779 auto input_adapter(T(&array)[N]) ->
decltype(input_adapter(array, array + N))
5787 class span_input_adapter
5790 template <
typename CharT,
5791 typename std::enable_if <
5792 std::is_pointer<CharT>::value&&
5793 std::is_integral<
typename std::remove_pointer<CharT>::type>::value &&
5794 sizeof(
typename std::remove_pointer<CharT>::type) == 1,
5796 span_input_adapter(CharT b,
std::size_t l)
5797 : ia(
reinterpret_cast<
const char*>(b),
reinterpret_cast<
const char*>(b) + l) {}
5799 template<
class IteratorType,
5800 typename std::enable_if<
5801 std::is_same<
typename iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value,
5803 span_input_adapter(IteratorType first, IteratorType last)
5804 : ia(input_adapter(first, last)) {}
5806 contiguous_bytes_input_adapter&& get()
5808 return std::move(ia);
5812 contiguous_bytes_input_adapter ia;
5834
5835
5836
5837
5838
5839
5840
5841 template<
typename BasicJsonType>
5844 using number_integer_t =
typename BasicJsonType::number_integer_t;
5845 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
5846 using number_float_t =
typename BasicJsonType::number_float_t;
5847 using string_t =
typename BasicJsonType::string_t;
5848 using binary_t =
typename BasicJsonType::binary_t;
5851
5852
5853
5857
5858
5859
5860
5864
5865
5866
5867
5871
5872
5873
5874
5878
5879
5880
5881
5882
5886
5887
5888
5889
5890
5894
5895
5896
5897
5898
5902
5903
5904
5905
5906
5910
5911
5912
5913
5914
5915 virtual bool key(string_t& val) = 0;
5918
5919
5920
5924
5925
5926
5927
5928
5932
5933
5934
5938
5939
5940
5941
5942
5943
5944 virtual bool parse_error(
std::size_t position,
5945 const std::string& last_token,
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972 template<
typename BasicJsonType>
5976 using number_integer_t =
typename BasicJsonType::number_integer_t;
5977 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
5978 using number_float_t =
typename BasicJsonType::number_float_t;
5979 using string_t =
typename BasicJsonType::string_t;
5980 using binary_t =
typename BasicJsonType::binary_t;
5983
5984
5985
5986
6085 template<
class Exception>
6086 bool parse_error(
std::size_t ,
const std::string& ,
6087 const Exception& ex)
6090 static_cast<
void>(
ex);
6105
6106
6107
6108
6109
6110 template<
typename Value>
6146 template<
typename BasicJsonType>
6150 using number_integer_t =
typename BasicJsonType::number_integer_t;
6151 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
6152 using number_float_t =
typename BasicJsonType::number_float_t;
6153 using string_t =
typename BasicJsonType::string_t;
6154 using binary_t =
typename BasicJsonType::binary_t;
6155 using parser_callback_t =
typename BasicJsonType::parser_callback_t;
6156 using parse_event_t =
typename BasicJsonType::parse_event_t;
6159 const parser_callback_t cb,
6160 const bool allow_exceptions_ =
true)
6335 template<
class Exception>
6336 bool parse_error(
std::size_t ,
const std::string& ,
6337 const Exception& ex)
6340 static_cast<
void>(
ex);
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369 template<
typename Value>
6370 std::pair<
bool, BasicJsonType*> handle_value(Value&& v,
const bool skip_callback =
false)
6378 return {
false,
nullptr };
6390 return {
false,
nullptr };
6396 return {
true, &
root };
6403 return {
false,
nullptr };
6425 return {
false,
nullptr };
6450 BasicJsonType
discarded = BasicJsonType::value_t::discarded;
6453 template<
typename BasicJsonType>
6457 using number_integer_t =
typename BasicJsonType::number_integer_t;
6458 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
6459 using number_float_t =
typename BasicJsonType::number_float_t;
6460 using string_t =
typename BasicJsonType::string_t;
6461 using binary_t =
typename BasicJsonType::binary_t;
6540#include <initializer_list>
6560 template<
typename BasicJsonType>
6594 return "<uninitialized>";
6596 return "true literal";
6598 return "false literal";
6600 return "null literal";
6602 return "string literal";
6606 return "number literal";
6620 return "<parse error>";
6622 return "end of input";
6624 return "'[', '{', or a literal";
6627 return "unknown token";
6633
6634
6635
6636
6637 template<
typename BasicJsonType,
typename InputAdapterType>
6640 using number_integer_t =
typename BasicJsonType::number_integer_t;
6641 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
6642 using number_float_t =
typename BasicJsonType::number_float_t;
6643 using string_t =
typename BasicJsonType::string_t;
6644 using char_type =
typename InputAdapterType::char_type;
6645 using char_int_type =
typename std::char_traits<char_type>::int_type;
6648 using token_type =
typename lexer_base<BasicJsonType>::token_type;
6650 explicit lexer(InputAdapterType&& adapter,
bool ignore_comments_ =
false)
noexcept
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6702 const auto factors = { 12u, 8u, 4u, 0u };
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744 bool next_byte_in_range(
std::initializer_list<char_int_type> ranges)
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6853 error_message =
"invalid string: '\\u' must be followed by 4 hex digits";
6867 error_message =
"invalid string: '\\u' must be followed by 4 hex digits";
6877 (
static_cast<
unsigned int>(
codepoint1) << 10u)
6887 error_message =
"invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
6893 error_message =
"invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
6901 error_message =
"invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
6942 error_message =
"invalid string: forbidden character after backslash";
6952 error_message =
"invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
6958 error_message =
"invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
6964 error_message =
"invalid string: control character U+0002 (STX) must be escaped to \\u0002";
6970 error_message =
"invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
6976 error_message =
"invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
6982 error_message =
"invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
6988 error_message =
"invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
6994 error_message =
"invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
7000 error_message =
"invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
7006 error_message =
"invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
7012 error_message =
"invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
7018 error_message =
"invalid string: control character U+000B (VT) must be escaped to \\u000B";
7024 error_message =
"invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
7030 error_message =
"invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
7036 error_message =
"invalid string: control character U+000E (SO) must be escaped to \\u000E";
7042 error_message =
"invalid string: control character U+000F (SI) must be escaped to \\u000F";
7048 error_message =
"invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
7054 error_message =
"invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
7060 error_message =
"invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
7066 error_message =
"invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
7072 error_message =
"invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
7078 error_message =
"invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
7084 error_message =
"invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
7090 error_message =
"invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
7096 error_message =
"invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
7102 error_message =
"invalid string: control character U+0019 (EM) must be escaped to \\u0019";
7108 error_message =
"invalid string: control character U+001A (SUB) must be escaped to \\u001A";
7114 error_message =
"invalid string: control character U+001B (ESC) must be escaped to \\u001B";
7120 error_message =
"invalid string: control character U+001C (FS) must be escaped to \\u001C";
7126 error_message =
"invalid string: control character U+001D (GS) must be escaped to \\u001D";
7132 error_message =
"invalid string: control character U+001E (RS) must be escaped to \\u001E";
7138 error_message =
"invalid string: control character U+001F (US) must be escaped to \\u001F";
7368
7369
7370
7432 error_message =
"invalid comment; expecting '/' or '*' after '/'";
7439 static void strtof(
float& f,
const char* str,
char** endptr)
noexcept
7445 static void strtof(
double& f,
const char* str,
char** endptr)
noexcept
7451 static void strtof(
long double& f,
const char* str,
char** endptr)
noexcept
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7715 "invalid number; expected '+', '-', or digit after exponent";
7741 error_message =
"invalid number; expected digit after exponent sign";
7822
7823
7824
7825
7828 token_type return_type)
7855
7856
7857
7858
7859
7860
7861
7862
7863
7894
7895
7896
7897
7898
7899
7900
7928 void add(char_int_type c)
7981 if (
static_cast<
unsigned char>(
c) <=
'\x1F')
8010
8011
8012
8018 return get() == 0xBB &&
get() == 0xBF;
8040 error_message =
"invalid BOM; must be 0xEF 0xBB 0xBF if given";
8177 template<
typename T>
8178 using null_function_t =
decltype(
std::declval<T&>().null());
8180 template<
typename T>
8184 template<
typename T,
typename Integer>
8185 using number_integer_function_t =
8186 decltype(
std::declval<T&>().number_integer(
std::declval<Integer>()));
8188 template<
typename T,
typename Unsigned>
8189 using number_unsigned_function_t =
8190 decltype(
std::declval<T&>().number_unsigned(
std::declval<Unsigned>()));
8192 template<
typename T,
typename Float,
typename String>
8193 using number_float_function_t =
decltype(
std::declval<T&>().number_float(
8194 std::declval<Float>(),
std::declval<
const String&>()));
8196 template<
typename T,
typename String>
8197 using string_function_t =
8198 decltype(
std::declval<T&>().string(
std::declval<String&>()));
8200 template<
typename T,
typename Binary>
8201 using binary_function_t =
8202 decltype(
std::declval<T&>().binary(
std::declval<Binary&>()));
8204 template<
typename T>
8208 template<
typename T,
typename String>
8209 using key_function_t =
8210 decltype(
std::declval<T&>().key(
std::declval<String&>()));
8212 template<
typename T>
8213 using end_object_function_t =
decltype(
std::declval<T&>().end_object());
8215 template<
typename T>
8219 template<
typename T>
8220 using end_array_function_t =
decltype(
std::declval<T&>().end_array());
8227 template<
typename SAX,
typename BasicJsonType>
8232 "BasicJsonType must be of type basic_json<...>");
8234 using number_integer_t =
typename BasicJsonType::number_integer_t;
8235 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
8236 using number_float_t =
typename BasicJsonType::number_float_t;
8237 using string_t =
typename BasicJsonType::string_t;
8238 using binary_t =
typename BasicJsonType::binary_t;
8239 using exception_t =
typename BasicJsonType::exception;
8258 template<
typename SAX,
typename BasicJsonType>
8263 "BasicJsonType must be of type basic_json<...>");
8265 using number_integer_t =
typename BasicJsonType::number_integer_t;
8266 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
8267 using number_float_t =
typename BasicJsonType::number_float_t;
8268 using string_t =
typename BasicJsonType::string_t;
8269 using binary_t =
typename BasicJsonType::binary_t;
8270 using exception_t =
typename BasicJsonType::exception;
8274 "Missing/invalid function: bool null()");
8276 "Missing/invalid function: bool boolean(bool)");
8278 "Missing/invalid function: bool boolean(bool)");
8282 "Missing/invalid function: bool number_integer(number_integer_t)");
8286 "Missing/invalid function: bool number_unsigned(number_unsigned_t)");
8289 "Missing/invalid function: bool number_float(number_float_t, const string_t&)");
8292 "Missing/invalid function: bool string(string_t&)");
8295 "Missing/invalid function: bool binary(binary_t&)");
8297 "Missing/invalid function: bool start_object(std::size_t)");
8299 "Missing/invalid function: bool key(string_t&)");
8301 "Missing/invalid function: bool end_object()");
8303 "Missing/invalid function: bool start_array(std::size_t)");
8305 "Missing/invalid function: bool end_array()");
8308 "Missing/invalid function: bool parse_error(std::size_t, const "
8309 "std::string&, const exception&)");
8333
8334
8335
8336
8337
8338
8341 return *
reinterpret_cast<
char*>(&num) == 1;
8350
8351
8352 template<
typename BasicJsonType,
typename InputAdapterType,
typename SAX =
json_sax_dom_parser<BasicJsonType>>
8355 using number_integer_t =
typename BasicJsonType::number_integer_t;
8356 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
8357 using number_float_t =
typename BasicJsonType::number_float_t;
8358 using string_t =
typename BasicJsonType::string_t;
8359 using binary_t =
typename BasicJsonType::binary_t;
8360 using json_sax_t = SAX;
8361 using char_type =
typename InputAdapterType::char_type;
8362 using char_int_type =
typename std::char_traits<char_type>::int_type;
8366
8367
8368
8369
8383
8384
8385
8386
8387
8388
8389
8393 const bool strict =
true,
8450
8451
8452
8472
8473
8474
8475
8476
8477
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507 template<
typename NumberType>
8520
8521
8522
8523
8524
8525
8526
8527
8528 template<
typename NumberType>
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555 bool parse_bson_element_internal(
const char_int_type element_type,
8556 const std::size_t element_type_parse_position)
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8668
8669
8670
8694
8695
8696
8697
8698
8699
8700
9134 const auto half =
static_cast<
unsigned int>((
byte1 << 8u) +
byte2);
9137 const int exp = (
half >> 10u) & 0x1Fu;
9138 const unsigned int mant =
half & 0x3FFu;
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9253 while (
get() != 0xFF)
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9352 while (
get() != 0xFF)
9373
9374
9375
9376
9377
9398 while (
get() != 0xFF)
9411
9412
9413
9414
9415
9446 while (
get() != 0xFF)
9470
9471
9843
9844
9845
9846
9847
9848
9849
9850
9851
9925
9926
9927
9928
9929
9930
9931
9932
9933
10042
10043
10044
10064
10065
10066
10098
10099
10100
10101
10102
10103
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10169 return sax->
parse_error(
chars_read,
last_token,
parse_error::
create(113,
chars_read,
exception_message(
input_format_t::
ubjson,
"expected length type specification (U, i, I, l, L); last byte: 0x" +
last_token,
"string"),
BasicJsonType()));
10174
10175
10176
10239 return sax->
parse_error(
chars_read,
last_token,
parse_error::
create(113,
chars_read,
exception_message(
input_format_t::
ubjson,
"expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" +
last_token,
"size"),
BasicJsonType()));
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254 bool get_ubjson_size_type(
std::pair<
std::size_t, char_int_type>& result)
10292
10293
10294
10295 bool get_ubjson_value(
const char_int_type prefix)
10394
10395
10456
10457
10601
10602
10603
10604
10605
10606
10607
10608
10616
10617
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641 template<
typename NumberType,
bool InputIsLittleEndian =
false>
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684 template<
typename NumberType>
10686 const NumberType len,
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717 template<
typename NumberType>
10719 const NumberType len,
10737
10738
10739
10740
10753
10754
10763
10764
10765
10766
10767
10769 const std::string& detail,
10770 const std::string& context)
const
10828#include <functional>
10872 template<
typename BasicJsonType>
10873 using parser_callback_t =
10877
10878
10879
10880
10881 template<
typename BasicJsonType,
typename InputAdapterType>
10884 using number_integer_t =
typename BasicJsonType::number_integer_t;
10885 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
10886 using number_float_t =
typename BasicJsonType::number_float_t;
10887 using string_t =
typename BasicJsonType::string_t;
10888 using lexer_t =
lexer<BasicJsonType, InputAdapterType>;
10889 using token_type =
typename lexer_t::token_type;
10893 explicit parser(InputAdapterType&& adapter,
10894 const parser_callback_t<BasicJsonType> cb =
nullptr,
10895 const bool allow_exceptions_ =
true,
10896 const bool skip_comments =
false)
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915 void parse(
const bool strict, BasicJsonType& result)
10970
10971
10972
10973
10974
10981 template<
typename SAX>
11000 template<
typename SAX>
11288 std::string exception_message(
const token_type expected,
const std::string& context)
11348
11349
11350
11351
11352
11353
11354
11355
11359 using difference_type =
std::ptrdiff_t;
11365 difference_type m_it = (
std::numeric_limits<
std::ptrdiff_t>::min)();
11399 return lhs.m_it == rhs.m_it;
11404 return lhs.m_it < rhs.m_it;
11409 auto result = *
this;
11416 return lhs.m_it - rhs.m_it;
11427 auto result = *
this;
11440 auto result = *
this;
11466
11467
11468
11469
11470
11487#include <type_traits>
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528 template<
typename BasicJsonType>
11532 using other_iter_impl =
iter_impl<
typename std::conditional<
std::is_const<BasicJsonType>::value,
typename std::remove_const<BasicJsonType>::type,
const BasicJsonType>::type>;
11534 friend other_iter_impl;
11535 friend BasicJsonType;
11539 using object_t =
typename BasicJsonType::object_t;
11540 using array_t =
typename BasicJsonType::array_t;
11542 static_assert(
is_basic_json<
typename std::remove_const<BasicJsonType>::type>::value,
11543 "iter_impl only accepts (const) basic_json");
11552 using iterator_category =
std::bidirectional_iterator_tag;
11555 using value_type =
typename BasicJsonType::value_type;
11557 using difference_type =
typename BasicJsonType::difference_type;
11559 using pointer =
typename std::conditional<
std::is_const<BasicJsonType>::value,
11560 typename BasicJsonType::const_pointer,
11561 typename BasicJsonType::pointer>::type;
11564 typename std::conditional<
std::is_const<BasicJsonType>::value,
11565 typename BasicJsonType::const_reference,
11566 typename BasicJsonType::reference>::type;
11574
11575
11576
11577
11578
11614
11615
11616
11617
11618
11619
11620
11623
11624
11625
11626
11627
11628
11634
11635
11636
11637
11638
11641 if (&
other !=
this)
11650
11651
11652
11653
11654 iter_impl(
const iter_impl<
typename std::remove_const<BasicJsonType>::type>& other)
noexcept
11659
11660
11661
11662
11663
11673
11674
11675
11676 void set_begin()
noexcept
11717
11718
11719
11756
11757
11758
11800
11801
11802
11842
11843
11844
11853
11854
11855
11893
11894
11895
11904
11905
11906
11944
11945
11946
11980
11981
11982
11990
11991
11992
12025
12026
12027
12034
12035
12036
12043
12044
12045
12052
12053
12054
12089
12090
12091
12098
12099
12100
12109
12110
12111
12120
12121
12122
12131
12132
12133
12160
12161
12162
12198
12199
12200
12214
12215
12216
12224 pointer m_object =
nullptr;
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266 template<
typename Base>
12270 using difference_type =
std::ptrdiff_t;
12272 using base_iterator =
std::reverse_iterator<Base>;
12274 using reference =
typename Base::reference;
12277 explicit json_reverse_iterator(
const typename base_iterator::iterator_type& it)
noexcept
12338 auto key()
const ->
decltype(
std::declval<Base>().key())
12340 auto it = --
this->
base();
12347 auto it = --
this->
base();
12359#include <algorithm>
12378 template<
typename BasicJsonType>
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407 explicit json_pointer(
const std::string& s =
"")
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653 void push_back(
const std::string& token)
12659 void push_back(
std::string&& token)
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678 bool empty()
const noexcept
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694 static typename BasicJsonType::size_type array_index(
const std::string& s)
12711 unsigned long long res = 0;
12752
12753
12754
12755
12756
12757
12758
12759 BasicJsonType& get_and_create(BasicJsonType& j)
const
12799
12800
12801
12802
12803
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838 BasicJsonType& get_unchecked(BasicJsonType* ptr)
const
12848 [](
const unsigned char x)
12900
12901
12902
12903
12904
12905 BasicJsonType& get_checked(BasicJsonType* ptr)
const
12925 ") is out of range", *
ptr));
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962 const BasicJsonType& get_unchecked(
const BasicJsonType* ptr)
const
13005
13006
13007
13008
13009
13010 const BasicJsonType& get_checked(
const BasicJsonType* ptr)
const
13030 ") is out of range", *
ptr));
13055
13056
13057
13058 bool contains(
const BasicJsonType* ptr)
const
13138
13139
13140
13141
13142
13143
13144
13145
13146 static std::vector<std::string> split(
const std::string& reference_string)
13208
13209
13210
13211
13212
13213
13214 static void flatten(
const std::string& reference_string,
13215 const BasicJsonType& value,
13216 BasicJsonType& result)
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284 static BasicJsonType
13285 unflatten(
const BasicJsonType& value)
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13347 std::vector<std::string> reference_tokens;
13354#include <initializer_list>
13364 template<
typename BasicJsonType>
13368 using value_type = BasicJsonType;
13384 enable_if_t<std::is_constructible<value_type, Args...>::value,
int> = 0 >
13385 json_ref(Args && ... args)
13433#include <algorithm>
13449#include <algorithm>
13483 template<
typename CharType>
13487 template<
typename CharType>
13491 explicit output_vector_adapter(std::vector<CharType>& vec)
noexcept
13512 template<
typename CharType>
13596
13597
13598 template<
typename BasicJsonType,
typename CharType>
13601 using string_t =
typename BasicJsonType::string_t;
13602 using binary_t =
typename BasicJsonType::binary_t;
13603 using number_float_t =
typename BasicJsonType::number_float_t;
13607
13608
13609
13610
13617
13618
13619
13647
13648
13971
13972
14293
14294
14295
14296
14297
14299 const bool use_type,
const bool add_prefix =
true)
14503
14504
14505
14512 static_cast<
void>(
j);
14519
14520
14522 const std::uint8_t element_type)
14531
14532
14541
14542
14544 const double value)
14551
14552
14559
14560
14562 const string_t& value)
14573
14574
14581
14582
14591
14592
14594 const std::int64_t value)
14609
14610
14613 return (value <=
static_cast<
std::uint64_t>((
std::numeric_limits<
std::int32_t>::max)()))
14614 ?
sizeof(
std::int32_t)
14615 :
sizeof(
std::int64_t);
14619
14620
14622 const BasicJsonType& j)
14641
14642
14644 const typename BasicJsonType::object_t& value)
14651
14652
14666
14667
14674
14675
14677 const typename BasicJsonType::array_t& value)
14693
14694
14696 const binary_t& value)
14707
14708
14709
14711 const BasicJsonType& j)
14753
14754
14755
14756
14757
14759 const BasicJsonType& j)
14800
14801
14802
14803
14804
14817
14818
14819
14838 return to_char_type(0xFA);
14843 return to_char_type(0xFB);
14852 return to_char_type(0xCA);
14857 return to_char_type(0xCB);
14865 template<
typename NumberType,
typename std::enable_if<
14866 std::is_floating_point<NumberType>::value,
int>::type = 0>
14867 void write_number_with_ubjson_prefix(
const NumberType n,
14868 const bool add_prefix)
14878 template<
typename NumberType,
typename std::enable_if<
14879 std::is_unsigned<NumberType>::value,
int>::type = 0>
14880 void write_number_with_ubjson_prefix(
const NumberType n,
14881 const bool add_prefix)
14940 template <
typename NumberType,
typename std::enable_if <
14941 std::is_signed<NumberType>::value &&
14942 !
std::is_floating_point<NumberType>::value,
int >::type = 0 >
14943 void write_number_with_ubjson_prefix(
const NumberType n,
14944 const bool add_prefix)
15005
15006
15007 CharType ubjson_prefix(
const BasicJsonType& j)
const noexcept
15088 static constexpr CharType get_ubjson_float_prefix(
float )
15093 static constexpr CharType get_ubjson_float_prefix(
double )
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113 template<
typename NumberType,
bool OutputIsLittleEndian =
false>
15114 void write_number(
const NumberType n)
15133#pragma GCC diagnostic push
15134#pragma GCC diagnostic ignored "-Wfloat-equal"
15138 static_cast<
double>(
static_cast<
float>(
n)) ==
static_cast<
double>(
n))
15153#pragma GCC diagnostic pop
15162 template <
typename C = CharType,
15163 enable_if_t < std::is_signed<C>::value&& std::is_signed<
char>::value >* =
nullptr >
15164 static constexpr CharType to_char_type(
std::uint8_t x)
noexcept
15166 return *
reinterpret_cast<
char*>(&x);
15169 template <
typename C = CharType,
15170 enable_if_t < std::is_signed<C>::value&& std::is_unsigned<
char>::value >* =
nullptr >
15171 static CharType to_char_type(
std::uint8_t x)
noexcept
15173 static_assert(
sizeof(
std::
uint8_t) ==
sizeof(
CharType),
"size of CharType must be equal to std::uint8_t");
15180 template<
typename C = CharType,
15181 enable_if_t<std::is_unsigned<C>::value>* =
nullptr>
15182 static constexpr CharType to_char_type(
std::uint8_t x)
noexcept
15187 template <
typename InputCharType,
typename C = CharType,
15189 std::is_signed<C>::value&&
15190 std::is_signed<
char>::value&&
15191 std::is_same<
char,
typename std::remove_cv<InputCharType>::type>::value
15193 static constexpr CharType to_char_type(InputCharType x)
noexcept
15213#include <algorithm>
15222#include <type_traits>
15233#include <type_traits>
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15265 template<
typename Target,
typename Source>
15268 static_assert(
sizeof(
Target) ==
sizeof(
Source),
"size mismatch");
15285
15286
15287
15297
15298
15299
15302 static_assert(
kPrecision == 64,
"internal error");
15327 const std::uint64_t u_lo = x
.f & 0xFFFFFFFFu;
15328 const std::uint64_t u_hi = x
.f >> 32u;
15329 const std::uint64_t v_lo = y
.f & 0xFFFFFFFFu;
15330 const std::uint64_t v_hi = y
.f >> 32u;
15332 const std::uint64_t p0 = u_lo * v_lo;
15333 const std::uint64_t p1 = u_lo * v_hi;
15334 const std::uint64_t p2 = u_hi * v_lo;
15335 const std::uint64_t p3 = u_hi * v_hi;
15337 const std::uint64_t p0_hi = p0 >> 32u;
15338 const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
15339 const std::uint64_t p1_hi = p1 >> 32u;
15340 const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
15341 const std::uint64_t p2_hi = p2 >> 32u;
15343 std::uint64_t Q = p0_hi + p1_lo + p2_lo;
15354 Q +=
std::uint64_t{ 1 } << (64u - 32u - 1u);
15356 const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
15358 return { h
, x
.e + y
.e + 64
};
15362
15363
15364
15369 while ((x
.f >> 63u) == 0)
15379
15380
15381
15384 const int delta = x
.e - target_exponent;
15389 return { x
.f << delta
, target_exponent
};
15401
15402
15403
15404
15405
15406 template<
typename FloatType>
15420 "internal error: dtoa_short requires an IEEE-754 floating-point implementation");
15540
15541
15542
15543
15544
15545
15598 constexpr int kCachedPowersMinDecExp = -300;
15599 constexpr int kCachedPowersDecStep = 8;
15604 { 0xAB70FE17C79AC6CA, -1060, -300 },
15605 { 0xFF77B1FCBEBCDC4F, -1034, -292 },
15606 { 0xBE5691EF416BD60C, -1007, -284 },
15607 { 0x8DD01FAD907FFC3C, -980, -276 },
15608 { 0xD3515C2831559A83, -954, -268 },
15609 { 0x9D71AC8FADA6C9B5, -927, -260 },
15610 { 0xEA9C227723EE8BCB, -901, -252 },
15611 { 0xAECC49914078536D, -874, -244 },
15612 { 0x823C12795DB6CE57, -847, -236 },
15613 { 0xC21094364DFB5637, -821, -228 },
15614 { 0x9096EA6F3848984F, -794, -220 },
15615 { 0xD77485CB25823AC7, -768, -212 },
15616 { 0xA086CFCD97BF97F4, -741, -204 },
15617 { 0xEF340A98172AACE5, -715, -196 },
15618 { 0xB23867FB2A35B28E, -688, -188 },
15619 { 0x84C8D4DFD2C63F3B, -661, -180 },
15620 { 0xC5DD44271AD3CDBA, -635, -172 },
15621 { 0x936B9FCEBB25C996, -608, -164 },
15622 { 0xDBAC6C247D62A584, -582, -156 },
15623 { 0xA3AB66580D5FDAF6, -555, -148 },
15624 { 0xF3E2F893DEC3F126, -529, -140 },
15625 { 0xB5B5ADA8AAFF80B8, -502, -132 },
15626 { 0x87625F056C7C4A8B, -475, -124 },
15627 { 0xC9BCFF6034C13053, -449, -116 },
15628 { 0x964E858C91BA2655, -422, -108 },
15629 { 0xDFF9772470297EBD, -396, -100 },
15630 { 0xA6DFBD9FB8E5B88F, -369, -92 },
15631 { 0xF8A95FCF88747D94, -343, -84 },
15632 { 0xB94470938FA89BCF, -316, -76 },
15633 { 0x8A08F0F8BF0F156B, -289, -68 },
15634 { 0xCDB02555653131B6, -263, -60 },
15635 { 0x993FE2C6D07B7FAC, -236, -52 },
15636 { 0xE45C10C42A2B3B06, -210, -44 },
15637 { 0xAA242499697392D3, -183, -36 },
15638 { 0xFD87B5F28300CA0E, -157, -28 },
15639 { 0xBCE5086492111AEB, -130, -20 },
15640 { 0x8CBCCC096F5088CC, -103, -12 },
15641 { 0xD1B71758E219652C, -77, -4 },
15642 { 0x9C40000000000000, -50, 4 },
15643 { 0xE8D4A51000000000, -24, 12 },
15644 { 0xAD78EBC5AC620000, 3, 20 },
15645 { 0x813F3978F8940984, 30, 28 },
15646 { 0xC097CE7BC90715B3, 56, 36 },
15647 { 0x8F7E32CE7BEA5C70, 83, 44 },
15648 { 0xD5D238A4ABE98068, 109, 52 },
15649 { 0x9F4F2726179A2245, 136, 60 },
15650 { 0xED63A231D4C4FB27, 162, 68 },
15651 { 0xB0DE65388CC8ADA8, 189, 76 },
15652 { 0x83C7088E1AAB65DB, 216, 84 },
15653 { 0xC45D1DF942711D9A, 242, 92 },
15654 { 0x924D692CA61BE758, 269, 100 },
15655 { 0xDA01EE641A708DEA, 295, 108 },
15656 { 0xA26DA3999AEF774A, 322, 116 },
15657 { 0xF209787BB47D6B85, 348, 124 },
15658 { 0xB454E4A179DD1877, 375, 132 },
15659 { 0x865B86925B9BC5C2, 402, 140 },
15660 { 0xC83553C5C8965D3D, 428, 148 },
15661 { 0x952AB45CFA97A0B3, 455, 156 },
15662 { 0xDE469FBD99A05FE3, 481, 164 },
15663 { 0xA59BC234DB398C25, 508, 172 },
15664 { 0xF6C69A72A3989F5C, 534, 180 },
15665 { 0xB7DCBF5354E9BECE, 561, 188 },
15666 { 0x88FCF317F22241E2, 588, 196 },
15667 { 0xCC20CE9BD35C78A5, 614, 204 },
15668 { 0x98165AF37B2153DF, 641, 212 },
15669 { 0xE2A0B5DC971F303A, 667, 220 },
15670 { 0xA8D9D1535CE3B396, 694, 228 },
15671 { 0xFB9B7CD9A4A7443C, 720, 236 },
15672 { 0xBB764C4CA7A44410, 747, 244 },
15673 { 0x8BAB8EEFB6409C1A, 774, 252 },
15674 { 0xD01FEF10A657842C, 800, 260 },
15675 { 0x9B10A4E5E9913129, 827, 268 },
15676 { 0xE7109BFBA19C0C9D, 853, 276 },
15677 { 0xAC2820D9623BF429, 880, 284 },
15678 { 0x80444B5E7AA7CF85, 907, 292 },
15679 { 0xBF21E44003ACDD2D, 933, 300 },
15680 { 0x8E679C2F5E44FF8F, 960, 308 },
15681 { 0xD433179D9C8CB841, 986, 316 },
15682 { 0x9E19DB92B4E31BA9, 1013, 324 },
15692 const int f =
kAlpha - e - 1;
15693 const int k = (f * 78913) / (1 << 18) +
static_cast<
int>(f > 0);
15695 const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
15697 JSON_ASSERT(
static_cast<std::size_t>(index) < kCachedPowers.size());
15699 const cached_power cached = kCachedPowers[
static_cast<std::size_t>(index)];
15707
15708
15709
15713 if (n >= 1000000000)
15715 pow10 = 1000000000;
15719 if (n >= 100000000)
15765 std::uint64_t rest,
std::uint64_t ten_k)
15792 && delta - rest >= ten_k
15793 && (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
15802
15803
15804
15808 static_assert(
kAlpha >= -60,
"internal error");
15809 static_assert(
kGamma <= -32,
"internal error");
15838 auto p1 =
static_cast<
std::uint32_t>(M_plus
.f >> -one
.e);
15839 std::uint64_t p2 = M_plus
.f & (one
.f - 1);
15847 std::uint32_t pow10{};
15875 const std::uint32_t d = p1 / pow10;
15876 const std::uint32_t r = p1 % pow10;
15882 buffer[length++] =
static_cast<
char>(
'0' + d);
15901 const std::uint64_t rest = (
std::uint64_t{ p1 } << -one
.e) + p2;
15906 decimal_exponent += n;
15917 const std::uint64_t ten_n =
std::uint64_t{ pow10 } << -one
.e;
15981 const std::uint64_t d = p2 >> -one
.e;
15982 const std::uint64_t r = p2 & (one
.f - 1);
15989 buffer[length++] =
static_cast<
char>(
'0' + d);
16014 decimal_exponent -= m;
16022 const std::uint64_t ten_m = one
.f;
16041
16042
16043
16044
16046 inline void grisu2(
char* buf,
int& len,
int& decimal_exponent,
16094 decimal_exponent = -cached
.k;
16100
16101
16102
16103
16104 template<
typename FloatType>
16106 void grisu2(
char* buf,
int& len,
int& decimal_exponent, FloatType value)
16109 "internal error: not enough precision");
16140
16141
16142
16143
16161 auto k =
static_cast<
std::uint32_t>(e);
16167 *buf++ =
static_cast<
char>(
'0' + k);
16171 *buf++ =
static_cast<
char>(
'0' + k / 10);
16173 *buf++ =
static_cast<
char>(
'0' + k);
16177 *buf++ =
static_cast<
char>(
'0' + k / 100);
16179 *buf++ =
static_cast<
char>(
'0' + k / 10);
16181 *buf++ =
static_cast<
char>(
'0' + k);
16188
16189
16190
16191
16192
16193
16194
16195
16199 int min_exp,
int max_exp)
16205 const int n = len + decimal_exponent;
16211 if (k <= n && n <= max_exp)
16216 std::memset(buf + k,
'0',
static_cast<size_t>(n) -
static_cast<size_t>(k));
16220 return buf + (
static_cast<size_t>(n) + 2);
16223 if (0 < n && n <= max_exp)
16230 std::memmove(buf + (
static_cast<size_t>(n) + 1), buf + n,
static_cast<size_t>(k) -
static_cast<size_t>(n));
16232 return buf + (
static_cast<size_t>(k) + 1U);
16235 if (min_exp < n && n <= 0)
16240 std::memmove(buf + (2 +
static_cast<size_t>(-n)), buf,
static_cast<size_t>(k));
16243 std::memset(buf + 2,
'0',
static_cast<size_t>(-n));
16244 return buf + (2U +
static_cast<size_t>(-n) +
static_cast<size_t>(k));
16259 std::memmove(buf + 2, buf + 1,
static_cast<size_t>(k) - 1);
16261 buf += 1 +
static_cast<size_t>(k);
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280 template<
typename FloatType>
16283 char*
to_chars(
char* first,
const char* last, FloatType value)
16285 static_cast<
void>(
last);
16296#pragma GCC diagnostic push
16297#pragma GCC diagnostic ignored "-Wfloat-equal"
16308#pragma GCC diagnostic pop
16367 template<
typename BasicJsonType>
16370 using string_t =
typename BasicJsonType::string_t;
16371 using number_float_t =
typename BasicJsonType::number_float_t;
16372 using number_integer_t =
typename BasicJsonType::number_integer_t;
16373 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
16374 using binary_char_t =
typename BasicJsonType::binary_t::value_type;
16380
16381
16382
16383
16384 serializer(output_adapter_t<
char> s,
const char ichar,
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16425 const bool pretty_print,
16426 const bool ensure_ascii,
16427 const unsigned int indent_step,
16428 const unsigned int current_indent = 0)
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16962
16963
16964
16965
16966
16967
16968
16969 inline unsigned int count_digits(number_unsigned_t x)
noexcept
16996
16997
16998
16999
17000
17001
17002
17003
17004 template <
typename NumberType, detail::enable_if_t <
17005 std::is_integral<NumberType>::value ||
17006 std::is_same<NumberType, number_unsigned_t>::value ||
17007 std::is_same<NumberType, number_integer_t>::value ||
17008 std::is_same<NumberType, binary_char_t>::value,
17010 void dump_integer(NumberType x)
17015 {{
'0',
'0'}}, {{
'0',
'1'}}, {{
'0',
'2'}}, {{
'0',
'3'}}, {{
'0',
'4'}}, {{
'0',
'5'}}, {{
'0',
'6'}}, {{
'0',
'7'}}, {{
'0',
'8'}}, {{
'0',
'9'}},
17016 {{
'1',
'0'}}, {{
'1',
'1'}}, {{
'1',
'2'}}, {{
'1',
'3'}}, {{
'1',
'4'}}, {{
'1',
'5'}}, {{
'1',
'6'}}, {{
'1',
'7'}}, {{
'1',
'8'}}, {{
'1',
'9'}},
17017 {{
'2',
'0'}}, {{
'2',
'1'}}, {{
'2',
'2'}}, {{
'2',
'3'}}, {{
'2',
'4'}}, {{
'2',
'5'}}, {{
'2',
'6'}}, {{
'2',
'7'}}, {{
'2',
'8'}}, {{
'2',
'9'}},
17018 {{
'3',
'0'}}, {{
'3',
'1'}}, {{
'3',
'2'}}, {{
'3',
'3'}}, {{
'3',
'4'}}, {{
'3',
'5'}}, {{
'3',
'6'}}, {{
'3',
'7'}}, {{
'3',
'8'}}, {{
'3',
'9'}},
17019 {{
'4',
'0'}}, {{
'4',
'1'}}, {{
'4',
'2'}}, {{
'4',
'3'}}, {{
'4',
'4'}}, {{
'4',
'5'}}, {{
'4',
'6'}}, {{
'4',
'7'}}, {{
'4',
'8'}}, {{
'4',
'9'}},
17020 {{
'5',
'0'}}, {{
'5',
'1'}}, {{
'5',
'2'}}, {{
'5',
'3'}}, {{
'5',
'4'}}, {{
'5',
'5'}}, {{
'5',
'6'}}, {{
'5',
'7'}}, {{
'5',
'8'}}, {{
'5',
'9'}},
17021 {{
'6',
'0'}}, {{
'6',
'1'}}, {{
'6',
'2'}}, {{
'6',
'3'}}, {{
'6',
'4'}}, {{
'6',
'5'}}, {{
'6',
'6'}}, {{
'6',
'7'}}, {{
'6',
'8'}}, {{
'6',
'9'}},
17022 {{
'7',
'0'}}, {{
'7',
'1'}}, {{
'7',
'2'}}, {{
'7',
'3'}}, {{
'7',
'4'}}, {{
'7',
'5'}}, {{
'7',
'6'}}, {{
'7',
'7'}}, {{
'7',
'8'}}, {{
'7',
'9'}},
17023 {{
'8',
'0'}}, {{
'8',
'1'}}, {{
'8',
'2'}}, {{
'8',
'3'}}, {{
'8',
'4'}}, {{
'8',
'5'}}, {{
'8',
'6'}}, {{
'8',
'7'}}, {{
'8',
'8'}}, {{
'8',
'9'}},
17024 {{
'9',
'0'}}, {{
'9',
'1'}}, {{
'9',
'2'}}, {{
'9',
'3'}}, {{
'9',
'4'}}, {{
'9',
'5'}}, {{
'9',
'6'}}, {{
'9',
'7'}}, {{
'9',
'8'}}, {{
'9',
'9'}},
17089
17090
17091
17092
17093
17094
17095
17096 void dump_float(number_float_t x)
17117 void dump_float(number_float_t x,
std::true_type )
17125 void dump_float(number_float_t x,
std::false_type )
17166 return c ==
'.' ||
c ==
'e';
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196 static std::uint8_t decode(
std::uint8_t& state,
std::uint32_t& codep,
const std::uint8_t byte)
noexcept
17201 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17202 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17203 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17204 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17205 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
17206 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
17207 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
17208 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3,
17209 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8,
17210 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1,
17211 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1,
17212 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
17213 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1,
17214 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
17232
17233
17234
17235
17236 number_unsigned_t remove_sign(number_unsigned_t x)
17243
17244
17245
17246
17247
17248
17249
17250
17251 inline number_unsigned_t remove_sign(number_integer_t x)
noexcept
17259 output_adapter_t<
char> o =
nullptr;
17292#include <functional>
17293#include <initializer_list>
17296#include <stdexcept>
17297#include <type_traits>
17309 template <
class Key,
class T,
class IgnoredLess =
std::less<Key>,
17310 class Allocator =
std::allocator<
std::pair<
const Key, T>>>
17311 struct ordered_map :
std::vector<
std::pair<
const Key, T>, Allocator>
17313 using key_type = Key;
17314 using mapped_type = T;
17315 using Container =
std::vector<
std::pair<
const Key, T>, Allocator>;
17316 using typename Container::iterator;
17317 using typename Container::const_iterator;
17318 using typename Container::size_type;
17319 using typename Container::value_type;
17323 ordered_map(
const Allocator& alloc = Allocator()) : Container{ alloc } {}
17324 template <
class It>
17325 ordered_map(It first, It last,
const Allocator& alloc = Allocator())
17326 : Container{ first, last, alloc } {}
17327 ordered_map(
std::initializer_list<T> init,
const Allocator& alloc = Allocator())
17328 : Container{ init, alloc } {}
17330 std::pair<iterator,
bool> emplace(
const key_type& key, T&& t)
17332 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17334 if (it->first == key)
17336 return { it,
false };
17339 Container::emplace_back(key, t);
17340 return { --
this->end(),
true };
17343 T& operator[](
const Key& key)
17345 return emplace(key, T{}).first->second;
17348 const T& operator[](
const Key& key)
const
17353 T& at(
const Key& key)
17355 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17357 if (it->first == key)
17363 JSON_THROW(std::out_of_range(
"key not found"));
17366 const T& at(
const Key& key)
const
17368 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17370 if (it->first == key)
17376 JSON_THROW(std::out_of_range(
"key not found"));
17379 size_type erase(
const Key& key)
17381 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17383 if (it->first == key)
17386 for (
auto next = it; ++next !=
this->end(); ++it)
17389 new (&*it) value_type{ std::move(*next) };
17391 Container::pop_back();
17398 iterator erase(iterator pos)
17403 for (
auto next = it; ++next !=
this->end(); ++it)
17406 new (&*it) value_type{ std::move(*next) };
17408 Container::pop_back();
17412 size_type count(
const Key& key)
const
17414 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17416 if (it->first == key)
17424 iterator find(
const Key& key)
17426 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17428 if (it->first == key)
17433 return Container::end();
17436 const_iterator find(
const Key& key)
const
17438 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17440 if (it->first == key)
17445 return Container::end();
17448 std::pair<iterator,
bool> insert(value_type&& value)
17450 return emplace(value.first, std::move(value.second));
17453 std::pair<iterator,
bool> insert(
const value_type& value)
17455 for (
auto it =
this->begin(); it !=
this->end(); ++it)
17457 if (it->first == value.first)
17459 return { it,
false };
17462 Container::push_back(value);
17463 return { --
this->end(),
true };
17466 template<
typename InputIt>
17467 using require_input_iter =
typename std::enable_if<std::is_convertible<
typename std::iterator_traits<InputIt>::iterator_category,
17468 std::input_iterator_tag>::value>::type;
17470 template<
typename InputIt,
typename = require_input_iter<InputIt>>
17471 void insert(InputIt first, InputIt last)
17473 for (
auto it = first; it != last; ++it)
17483#if defined(JSON_HAS_CPP_17)
17484#include <string_view>
17488
17489
17490
17491
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17586 template<
typename BasicJsonType,
typename InputType>
17589 template<
typename BasicJsonType>
17591 template<
typename BasicJsonType,
typename CharType>
17593 template<
typename BasicJsonType,
typename InputType,
typename SAX>
17595 template<
typename BasicJsonType>
17597 template<
typename BasicJsonType>
17608 template<
typename InputAdapterType>
17610 InputAdapterType adapter,
17611 detail::parser_callback_t<basic_json>cb =
nullptr,
17612 const bool allow_exceptions =
true,
17613 const bool ignore_comments =
false
17622 template<
typename BasicJsonType>
17624 template<
typename BasicJsonType>
17626 template<
typename Iterator>
17644 template<
typename T,
typename SFINAE>
17645 using json_serializer = JSONSerializer<T, SFINAE>;
17694 using reference = value_type&;
17696 using const_reference =
const value_type&;
17699 using difference_type =
std::ptrdiff_t;
17707 using pointer =
typename std::allocator_traits<allocator_type>::pointer;
17709 using const_pointer =
typename std::allocator_traits<allocator_type>::const_pointer;
17724
17725
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17762 result[
"copyright"] =
"(C) 2013-2021 Niels Lohmann";
17763 result[
"name"] =
"JSON for Modern C++";
17764 result[
"url"] =
"https://github.com/nlohmann/json";
17765 result[
"version"][
"string"] =
17774 result[
"platform"] =
"win32";
17775#elif defined __linux__
17776 result[
"platform"] =
"linux";
17777#elif defined __APPLE__
17778 result[
"platform"] =
"apple";
17779#elif defined __unix__
17780 result[
"platform"] =
"unix";
17782 result[
"platform"] =
"unknown";
17785#if defined(__ICC) || defined(__INTEL_COMPILER)
17787#elif defined(__clang__
)
17788 result[
"compiler"] = { {
"family",
"clang"}, {
"version", __clang_version__} };
17789#elif defined(__GNUC__) || defined(__GNUG__)
17791#elif defined(__HP_cc) || defined(__HP_aCC)
17792 result[
"compiler"] =
"hp"
17793#elif defined(__IBMCPP__)
17795#elif defined(_MSC_VER)
17796 result[
"compiler"] = { {
"family",
"msvc"}, {
"version",
_MSC_VER} };
17797#elif defined(__PGI)
17798 result[
"compiler"] = { {
"family",
"pgcpp"}, {
"version",
__PGI} };
17799#elif defined(__SUNPRO_CC)
17802 result[
"compiler"] = { {
"family",
"unknown"}, {
"version",
"unknown"} };
17808 result[
"compiler"][
"c++"] =
"unknown";
17823#if defined(JSON_HAS_CPP_14
)
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017 using string_t = StringType;
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043 using boolean_t = BooleanType;
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115 using number_integer_t = NumberIntegerType;
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186 using number_unsigned_t = NumberUnsignedType;
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254 using number_float_t = NumberFloatType;
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18331 template<
typename T,
typename... Args>
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18412 case value_t::object:
18414 object = create<object_t>();
18418 case value_t::array:
18420 array = create<array_t>();
18424 case value_t::string:
18426 string = create<string_t>(
"");
18430 case value_t::binary:
18432 binary = create<binary_t>();
18436 case value_t::boolean:
18438 boolean = boolean_t(
false);
18442 case value_t::number_integer:
18444 number_integer = number_integer_t(0);
18448 case value_t::number_unsigned:
18450 number_unsigned = number_unsigned_t(0);
18454 case value_t::number_float:
18456 number_float = number_float_t(0.0);
18460 case value_t::null:
18466 case value_t::discarded:
18472 JSON_THROW(other_error::create(500,
"961c151d2e87f2686a955a9be24d316f1362bf21 3.10.2", basic_json()));
18482 string = create<string_t>(value);
18488 string = create<string_t>(std::move(value));
18494 object = create<object_t>(value);
18500 object = create<object_t>(std::move(value));
18506 array = create<array_t>(value);
18512 array = create<array_t>(std::move(value));
18518 binary = create<binary_t>(value);
18524 binary = create<binary_t>(std::move(value));
18530 binary = create<binary_t>(value);
18536 binary = create<binary_t>(std::move(value));
18541 if (t == value_t::array || t == value_t::object)
18544 std::vector<basic_json> stack;
18547 if (t == value_t::array)
18549 stack.reserve(array->size());
18550 std::move(array->begin(), array->end(), std::back_inserter(stack));
18554 stack.reserve(object->size());
18555 for (
auto&& it : *object)
18557 stack.push_back(std::move(it.second));
18561 while (!stack.empty())
18564 basic_json current_item(std::move(stack.back()));
18569 if (current_item.is_array())
18571 std::move(current_item.m_value.array->begin(), current_item.m_value.array->end(), std::back_inserter(stack));
18573 current_item.m_value.array->clear();
18575 else if (current_item.is_object())
18577 for (
auto&& it : *current_item.m_value.object)
18579 stack.push_back(std::move(it.second));
18582 current_item.m_value.object->clear();
18592 case value_t::object:
18594 AllocatorType<object_t> alloc;
18595 std::allocator_traits<
decltype(alloc)>::destroy(alloc, object);
18596 std::allocator_traits<
decltype(alloc)>::deallocate(alloc, object, 1);
18600 case value_t::array:
18602 AllocatorType<array_t> alloc;
18603 std::allocator_traits<
decltype(alloc)>::destroy(alloc, array);
18604 std::allocator_traits<
decltype(alloc)>::deallocate(alloc, array, 1);
18608 case value_t::string:
18610 AllocatorType<string_t> alloc;
18611 std::allocator_traits<
decltype(alloc)>::destroy(alloc, string);
18612 std::allocator_traits<
decltype(alloc)>::deallocate(alloc, string, 1);
18616 case value_t::binary:
18618 AllocatorType<binary_t> alloc;
18619 std::allocator_traits<
decltype(alloc)>::destroy(alloc, binary);
18620 std::allocator_traits<
decltype(alloc)>::deallocate(alloc, binary, 1);
18624 case value_t::null:
18625 case value_t::boolean:
18626 case value_t::number_integer:
18627 case value_t::number_unsigned:
18628 case value_t::number_float:
18629 case value_t::discarded:
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18715 iterator set_parents(iterator it,
typename iterator::difference_type count)
18723 static_cast<
void>(
count);
18745#ifdef JSON_HEDLEY_MSVC_VERSION
18746#pragma warning(push )
18747#pragma warning(disable : 4127
)
18754#ifdef JSON_HEDLEY_MSVC_VERSION
18755#pragma warning( pop )
18760 static_cast<
void>(
j);
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970 template <
typename CompatibleType,
18972 detail::enable_if_t <
18973 !detail::is_basic_json<U>::value&& detail::is_compatible_type<basic_json_t, U>::value,
int > = 0 >
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009 template <
typename BasicJsonType,
19010 detail::enable_if_t <
19011 detail::is_basic_json<BasicJsonType>::value && !std::is_same<basic_json, BasicJsonType>::value,
int > = 0 >
19012 basic_json(
const BasicJsonType& val)
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136 basic_json(initializer_list_t init,
19137 bool type_deduction =
true,
19138 value_t manual_type = value_t
::array)
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19217 static basic_json binary(
const typename binary_t::container_type& init)
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19254 static basic_json binary(
const typename binary_t::container_type& init,
typename binary_t::subtype_type subtype)
19274 static basic_json binary(
typename binary_t::container_type&& init,
typename binary_t::subtype_type subtype)
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454 template <
class InputIT,
typename std::enable_if <
19455 std::is_same<InputIT,
typename basic_json_t::iterator>::value ||
19456 std::is_same<InputIT,
typename basic_json_t::const_iterator>::value,
int >::type = 0 >
19457 basic_json(InputIT first, InputIT last)
19564 template<
typename JsonRef,
19565 detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>,
19566 std::is_same<
typename JsonRef::value_type, basic_json>>::value,
int> = 0 >
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19725 std::is_nothrow_move_constructible<value_t>::value&&
19726 std::is_nothrow_move_assignable<value_t>::value&&
19727 std::is_nothrow_move_constructible<json_value>::value&&
19728 std::is_nothrow_move_assignable<json_value>::value
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758 ~basic_json()
noexcept
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822 string_t dump(
const int indent = -1,
19823 const char indent_char =
' ',
19824 const bool ensure_ascii =
false,
19825 const error_handler_t error_handler = error_handler_t
::strict)
const
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875 constexpr value_t type()
const noexcept
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906 constexpr bool is_primitive()
const noexcept
19908 return is_null() || is_string() || is_boolean() || is_number() || is_binary();
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933 constexpr bool is_structured()
const noexcept
19935 return is_array() || is_object();
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955 constexpr bool is_null()
const noexcept
19957 return m_type == value_t
::null;
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977 constexpr bool is_boolean()
const noexcept
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007 constexpr bool is_number()
const noexcept
20009 return is_number_integer() || is_number_float();
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036 constexpr bool is_number_integer()
const noexcept
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064 constexpr bool is_number_unsigned()
const noexcept
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092 constexpr bool is_number_float()
const noexcept
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114 constexpr bool is_object()
const noexcept
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136 constexpr bool is_array()
const noexcept
20138 return m_type == value_t
::array;
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158 constexpr bool is_string()
const noexcept
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180 constexpr bool is_binary()
const noexcept
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207 constexpr bool is_discarded()
const noexcept
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233 constexpr operator value_t()
const noexcept
20246 boolean_t get_impl(boolean_t* )
const
20257 object_t* get_impl_ptr(object_t* )
noexcept
20263 constexpr const object_t* get_impl_ptr(
const object_t* )
const noexcept
20265 return is_object() ?
m_value.object :
nullptr;
20269 array_t* get_impl_ptr(array_t* )
noexcept
20275 constexpr const array_t* get_impl_ptr(
const array_t* )
const noexcept
20277 return is_array() ?
m_value.array :
nullptr;
20281 string_t* get_impl_ptr(string_t* )
noexcept
20287 constexpr const string_t* get_impl_ptr(
const string_t* )
const noexcept
20289 return is_string() ?
m_value.string :
nullptr;
20293 boolean_t* get_impl_ptr(boolean_t* )
noexcept
20299 constexpr const boolean_t* get_impl_ptr(
const boolean_t* )
const noexcept
20301 return is_boolean() ? &
m_value.boolean :
nullptr;
20305 number_integer_t* get_impl_ptr(number_integer_t* )
noexcept
20311 constexpr const number_integer_t* get_impl_ptr(
const number_integer_t* )
const noexcept
20313 return is_number_integer() ? &
m_value.number_integer :
nullptr;
20317 number_unsigned_t* get_impl_ptr(number_unsigned_t* )
noexcept
20323 constexpr const number_unsigned_t* get_impl_ptr(
const number_unsigned_t* )
const noexcept
20325 return is_number_unsigned() ? &
m_value.number_unsigned :
nullptr;
20329 number_float_t* get_impl_ptr(number_float_t* )
noexcept
20335 constexpr const number_float_t* get_impl_ptr(
const number_float_t* )
const noexcept
20337 return is_number_float() ? &
m_value.number_float :
nullptr;
20341 binary_t* get_impl_ptr(binary_t* )
noexcept
20347 constexpr const binary_t* get_impl_ptr(
const binary_t* )
const noexcept
20349 return is_binary() ?
m_value.binary :
nullptr;
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363 template<
typename ReferenceType,
typename ThisType>
20364 static ReferenceType get_ref_impl(ThisType& obj)
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408 template<
typename PointerType,
typename std::enable_if<
20409 std::is_pointer<PointerType>::value,
int>::type = 0>
20417
20418
20419
20420 template <
typename PointerType,
typename std::enable_if <
20421 std::is_pointer<PointerType>::value&&
20422 std::is_const<
typename std::remove_pointer<PointerType>::type>::value,
int >::type = 0 >
20423 constexpr auto get_ptr()
const noexcept ->
decltype(std::declval<
const basic_json_t&>().get_impl_ptr(std::declval<PointerType>()))
20426 return get_impl_ptr(
static_cast<PointerType>(
nullptr));
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468 template <
typename ValueType,
20469 detail::enable_if_t <
20470 detail::is_default_constructible<ValueType>::value&&
20471 detail::has_from_json<basic_json_t, ValueType>::value,
20474 JSONSerializer<ValueType>::from_json(std::declval<
const basic_json_t&>(), std::declval<ValueType&>())))
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511 template <
typename ValueType,
20512 detail::enable_if_t <
20513 detail::has_non_default_from_json<basic_json_t, ValueType>::value,
20516 JSONSerializer<ValueType>::from_json(std::declval<
const basic_json_t&>())))
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536 template <
typename BasicJsonType,
20537 detail::enable_if_t <
20538 detail::is_basic_json<BasicJsonType>::value,
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559 template<
typename BasicJsonType,
20560 detail::enable_if_t<
20561 std::is_same<BasicJsonType, basic_json_t>::value,
20569
20570
20571
20572 template<
typename PointerType,
20573 detail::enable_if_t<
20574 std::is_pointer<PointerType>::value,
20576 constexpr auto get_impl(detail::priority_tag<4> )
const noexcept
20577 ->
decltype(std::declval<
const basic_json_t&>().
template get_ptr<PointerType>())
20580 return get_ptr<PointerType>();
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607 template <
typename ValueTypeCV,
typename ValueType = detail::uncvref_t<ValueTypeCV>>
20608#if defined(JSON_HAS_CPP_14
)
20611 auto get()
const noexcept(
20612 noexcept(std::declval<
const basic_json_t&>().
template get_impl<ValueType>(detail::priority_tag<4> {})))
20613 ->
decltype(std::declval<
const basic_json_t&>().
template get_impl<ValueType>(detail::priority_tag<4> {}))
20618 static_assert(!
std::is_reference<ValueTypeCV>::value,
20619 "get() cannot be used with reference types, you might want to use get_ref()");
20620 return get_impl<ValueType>(detail::priority_tag<4> {});
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650 template<
typename PointerType,
typename std::enable_if<
20651 std::is_pointer<PointerType>::value,
int>::type = 0>
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691 template <
typename ValueType,
20692 detail::enable_if_t <
20693 !detail::is_basic_json<ValueType>::value&&
20694 detail::has_from_json<basic_json_t, ValueType>::value,
20696 ValueType& get_to(ValueType& v)
const noexcept(
noexcept(
20697 JSONSerializer<ValueType>::from_json(std::declval<
const basic_json_t&>(), v)))
20705 template<
typename ValueType,
20706 detail::enable_if_t <
20707 detail::is_basic_json<ValueType>::value,
20709 ValueType& get_to(ValueType& v)
const
20716 typename T,
std::size_t N,
20717 typename Array = T(&)[N],
20718 detail::enable_if_t <
20719 detail::has_from_json<basic_json_t, Array>::value,
int > = 0 >
20720 Array get_to(T(&v)[N])
const
20721 noexcept(
noexcept(JSONSerializer<Array>::from_json(
20722 std::declval<
const basic_json_t&>(), v)))
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754 template<
typename ReferenceType,
typename std::enable_if<
20755 std::is_reference<ReferenceType>::value,
int>::type = 0>
20756 ReferenceType get_ref()
20763
20764
20765
20766 template <
typename ReferenceType,
typename std::enable_if <
20767 std::is_reference<ReferenceType>::value&&
20768 std::is_const<
typename std::remove_reference<ReferenceType>::type>::value,
int >::type = 0 >
20769 ReferenceType get_ref()
const
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804 template <
typename ValueType,
typename std::enable_if <
20805 detail::conjunction <
20806 detail::negation<std::is_pointer<ValueType>>,
20807 detail::negation<std::is_same<ValueType, detail::json_ref<basic_json>>>,
20808 detail::negation<std::is_same<ValueType,
typename string_t::value_type>>,
20809 detail::negation<detail::is_basic_json<ValueType>>,
20810 detail::negation<std::is_same<ValueType, std::initializer_list<
typename string_t::value_type>>>,
20812#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER
) && _MSC_VER
>= 1910
&& _MSC_VER
<= 1914
))
20813 detail::negation<std::is_same<ValueType, std::string_view>>,
20815 detail::is_detected_lazy<detail::get_template_function,
const basic_json_t&, ValueType>
20816 >::value,
int >::type = 0 >
20824
20825
20826
20827
20828
20829
20830
20831
20832 binary_t& get_binary()
20843 const binary_t& get_binary()
const
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890 reference at(size_type idx)
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937 const_reference at(size_type idx)
const
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988 reference at(
const typename object_t::key_type& key)
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039 const_reference at(
const typename object_t::key_type& key)
const
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085 reference operator[](size_type idx)
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138 const_reference operator[](size_type idx)
const
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176 reference operator[](
const typename object_t::key_type& key)
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225 const_reference operator[](
const typename object_t::key_type& key)
const
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264 template<
typename T>
21266 reference operator[](T* key)
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315 template<
typename T>
21317 const_reference operator[](T* key)
const
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21380 template <
class ValueType,
typename std::enable_if <
21381 detail::is_getable<basic_json_t, ValueType>::value
21382 && !std::is_same<value_t, ValueType>::value,
int >::type = 0 >
21383 ValueType value(
const typename object_t::key_type& key,
const ValueType& default_value)
const
21402
21403
21404
21405 string_t value(
const typename object_t::key_type& key,
const char* default_value)
const
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453 template<
class ValueType,
typename std::enable_if<
21454 detail::is_getable<basic_json_t, ValueType>::value,
int>::type = 0>
21455 ValueType value(
const json_pointer& ptr,
const ValueType& default_value)
const
21475
21476
21477
21479 string_t value(
const json_pointer& ptr,
const char* default_value)
const
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21515
21516
21517 const_reference front()
const
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21561
21562
21563 const_reference back()
const
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616 template <
class IteratorType,
typename std::enable_if <
21617 std::is_same<IteratorType,
typename basic_json_t::iterator>::value ||
21618 std::is_same<IteratorType,
typename basic_json_t::const_iterator>::value,
int >::type
21620 IteratorType erase(IteratorType pos)
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731 template <
class IteratorType,
typename std::enable_if <
21732 std::is_same<IteratorType,
typename basic_json_t::iterator>::value ||
21733 std::is_same<IteratorType,
typename basic_json_t::const_iterator>::value,
int >::type
21735 IteratorType erase(IteratorType first, IteratorType last)
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832 size_type erase(
const typename object_t::key_type& key)
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867 void erase(
const size_type idx)
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919 template<
typename KeyT>
21920 iterator find(KeyT&& key)
21933
21934
21935
21936 template<
typename KeyT>
21937 const_iterator find(KeyT&& key)
const
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970 template<
typename KeyT>
21971 size_type count(KeyT&& key)
const
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002 template <
typename KeyT,
typename std::enable_if <
22003 !
std::is_same<
typename std::decay<KeyT>::type, json_pointer>::value,
int >::type = 0 >
22004 bool contains(KeyT&& key)
const
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035 bool contains(
const json_pointer& ptr)
const
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074 iterator begin()
noexcept
22082
22083
22084 const_iterator begin()
const noexcept
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114 const_iterator cbegin()
const noexcept
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145 iterator end()
noexcept
22153
22154
22155 const_iterator end()
const noexcept
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185 const_iterator cend()
const noexcept
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215 reverse_iterator rbegin()
noexcept
22221
22222
22223 const_reverse_iterator rbegin()
const noexcept
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252 reverse_iterator rend()
noexcept
22258
22259
22260 const_reverse_iterator rend()
const noexcept
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289 const_reverse_iterator crbegin()
const noexcept
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318 const_reverse_iterator crend()
const noexcept
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22382 static iteration_proxy<iterator> iterator_wrapper(reference ref)
noexcept
22388
22389
22391 static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref)
noexcept
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464 iteration_proxy<iterator> items()
noexcept
22470
22471
22472 iteration_proxy<const_iterator> items()
const noexcept
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529 bool empty()
const noexcept
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609 size_type size()
const noexcept
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687 size_type max_size()
const noexcept
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766 void clear()
noexcept
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22869
22870
22871
22879
22880
22881
22905
22906
22907
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934 void push_back(
const typename object_t::value_type& val)
22956
22957
22958
22959 reference operator+=(
const typename object_t::value_type& val)
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990 void push_back(initializer_list_t init)
23005
23006
23007
23008 reference operator+=(initializer_list_t init)
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037 template<
class... Args>
23038 reference emplace_back(Args&& ... args)
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087 template<
class... Args>
23088 std::pair<iterator,
bool> emplace(Args&& ... args)
23119 template<
typename... Args>
23120 iterator insert_iterator(const_iterator pos, Args&& ... args)
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159 iterator insert(const_iterator pos,
const basic_json& val)
23178
23179
23180
23181 iterator insert(const_iterator pos, basic_json&& val)
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210 iterator insert(const_iterator pos, size_type cnt,
const basic_json& val)
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258 iterator insert(const_iterator pos, const_iterator first, const_iterator last)
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311 iterator insert(const_iterator pos, initializer_list_t ilist)
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352 void insert(const_iterator first, const_iterator last)
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394 void update(const_reference j)
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445 void update(const_iterator first, const_iterator last)
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496 void swap(reference other)
noexcept (
23497 std::is_nothrow_move_constructible<value_t>::value&&
23498 std::is_nothrow_move_assignable<value_t>::value&&
23499 std::is_nothrow_move_constructible<json_value>::value&&
23500 std::is_nothrow_move_assignable<json_value>::value
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529 friend void swap(reference left, reference right)
noexcept (
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559 void swap(array_t& other)
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592 void swap(object_t& other)
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625 void swap(string_t& other)
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658 void swap(binary_t& other)
23672 void swap(
typename binary_t::container_type& other)
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750 friend bool operator==(const_reference lhs, const_reference rhs)
noexcept
23753#pragma GCC diagnostic push
23754#pragma GCC diagnostic ignored "-Wfloat-equal"
23822#pragma GCC diagnostic pop
23827
23828
23829
23830 template<
typename ScalarType,
typename std::enable_if<
23831 std::is_scalar<ScalarType>::value,
int>::type = 0>
23832 friend bool operator==(const_reference lhs, ScalarType rhs)
noexcept
23838
23839
23840
23841 template<
typename ScalarType,
typename std::enable_if<
23842 std::is_scalar<ScalarType>::value,
int>::type = 0>
23843 friend bool operator==(ScalarType lhs, const_reference rhs)
noexcept
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866 friend bool operator!=(const_reference lhs, const_reference rhs)
noexcept
23872
23873
23874
23875 template<
typename ScalarType,
typename std::enable_if<
23876 std::is_scalar<ScalarType>::value,
int>::type = 0>
23877 friend bool operator!=(const_reference lhs, ScalarType rhs)
noexcept
23883
23884
23885
23886 template<
typename ScalarType,
typename std::enable_if<
23887 std::is_scalar<ScalarType>::value,
int>::type = 0>
23888 friend bool operator!=(ScalarType lhs, const_reference rhs)
noexcept
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919 friend bool operator<(const_reference lhs, const_reference rhs)
noexcept
23994
23995
23996
23997 template<
typename ScalarType,
typename std::enable_if<
23998 std::is_scalar<ScalarType>::value,
int>::type = 0>
23999 friend bool operator<(const_reference lhs, ScalarType rhs)
noexcept
24005
24006
24007
24008 template<
typename ScalarType,
typename std::enable_if<
24009 std::is_scalar<ScalarType>::value,
int>::type = 0>
24010 friend bool operator<(ScalarType lhs, const_reference rhs)
noexcept
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034 friend bool operator<=(const_reference lhs, const_reference rhs)
noexcept
24040
24041
24042
24043 template<
typename ScalarType,
typename std::enable_if<
24044 std::is_scalar<ScalarType>::value,
int>::type = 0>
24045 friend bool operator<=(const_reference lhs, ScalarType rhs)
noexcept
24051
24052
24053
24054 template<
typename ScalarType,
typename std::enable_if<
24055 std::is_scalar<ScalarType>::value,
int>::type = 0>
24056 friend bool operator<=(ScalarType lhs, const_reference rhs)
noexcept
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080 friend bool operator>(const_reference lhs, const_reference rhs)
noexcept
24086
24087
24088
24089 template<
typename ScalarType,
typename std::enable_if<
24090 std::is_scalar<ScalarType>::value,
int>::type = 0>
24091 friend bool operator>(const_reference lhs, ScalarType rhs)
noexcept
24097
24098
24099
24100 template<
typename ScalarType,
typename std::enable_if<
24101 std::is_scalar<ScalarType>::value,
int>::type = 0>
24102 friend bool operator>(ScalarType lhs, const_reference rhs)
noexcept
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126 friend bool operator>=(const_reference lhs, const_reference rhs)
noexcept
24132
24133
24134
24135 template<
typename ScalarType,
typename std::enable_if<
24136 std::is_scalar<ScalarType>::value,
int>::type = 0>
24137 friend bool operator>=(const_reference lhs, ScalarType rhs)
noexcept
24143
24144
24145
24146 template<
typename ScalarType,
typename std::enable_if<
24147 std::is_scalar<ScalarType>::value,
int>::type = 0>
24148 friend bool operator>=(ScalarType lhs, const_reference rhs)
noexcept
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24209
24210
24211
24212
24213
24214
24215
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283 template<
typename InputType>
24286 const parser_callback_t cb =
nullptr,
24287 const bool allow_exceptions =
true,
24288 const bool ignore_comments =
false)
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321 template<
typename IteratorType>
24325 const parser_callback_t cb =
nullptr,
24326 const bool allow_exceptions =
true,
24327 const bool ignore_comments =
false)
24337 const parser_callback_t cb =
nullptr,
24338 const bool allow_exceptions =
true,
24339 const bool ignore_comments =
false)
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376 template<
typename InputType>
24377 static bool accept(InputType&& i,
24378 const bool ignore_comments =
false)
24383 template<
typename IteratorType>
24384 static bool accept(IteratorType first, IteratorType last,
24385 const bool ignore_comments =
false)
24392 static bool accept(
detail::span_input_adapter&& i,
24393 const bool ignore_comments =
false)
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438 template <
typename InputType,
typename SAX>
24440 static bool sax_parse(InputType&& i, SAX* sax,
24441 input_format_t format = input_format_t
::json,
24442 const bool strict =
true,
24443 const bool ignore_comments =
false)
24451 template<
class IteratorType,
class SAX>
24453 static bool sax_parse(IteratorType first, IteratorType last, SAX* sax,
24454 input_format_t format = input_format_t
::json,
24455 const bool strict =
true,
24456 const bool ignore_comments =
false)
24464 template <
typename SAX>
24467 static bool sax_parse(
detail::span_input_adapter&& i, SAX* sax,
24468 input_format_t format = input_format_t
::json,
24469 const bool strict =
true,
24470 const bool ignore_comments =
false)
24481
24482
24483
24484
24485
24486
24487
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24563 const char* type_name()
const noexcept
24581 return "discarded";
24598 value_t m_type = value_t
::null;
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24922 const bool use_size =
false,
const bool use_type =
false)
24928 const bool use_size =
false,
const bool use_type =
false)
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24998
24999
25000
25001
25002
25003
25004
25011
25012
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121 template<
typename InputType>
25124 const bool strict =
true,
25125 const bool allow_exceptions =
true,
25126 const cbor_tag_handler_t tag_handler = cbor_tag_handler_t
::error)
25136
25137
25138 template<
typename IteratorType>
25141 const bool strict =
true,
25142 const bool allow_exceptions =
true,
25143 const cbor_tag_handler_t tag_handler = cbor_tag_handler_t
::error)
25152 template<
typename T>
25156 const bool strict =
true,
25157 const bool allow_exceptions =
true,
25158 const cbor_tag_handler_t tag_handler = cbor_tag_handler_t
::error)
25167 const bool strict =
true,
25168 const bool allow_exceptions =
true,
25169 const cbor_tag_handler_t tag_handler = cbor_tag_handler_t
::error)
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265 template<
typename InputType>
25268 const bool strict =
true,
25269 const bool allow_exceptions =
true)
25279
25280
25281 template<
typename IteratorType>
25284 const bool strict =
true,
25285 const bool allow_exceptions =
true)
25295 template<
typename T>
25299 const bool strict =
true,
25300 const bool allow_exceptions =
true)
25308 const bool strict =
true,
25309 const bool allow_exceptions =
true)
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382 template<
typename InputType>
25385 const bool strict =
true,
25386 const bool allow_exceptions =
true)
25396
25397
25398 template<
typename IteratorType>
25401 const bool strict =
true,
25402 const bool allow_exceptions =
true)
25411 template<
typename T>
25415 const bool strict =
true,
25416 const bool allow_exceptions =
true)
25424 const bool strict =
true,
25425 const bool allow_exceptions =
true)
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496 template<
typename InputType>
25499 const bool strict =
true,
25500 const bool allow_exceptions =
true)
25510
25511
25512 template<
typename IteratorType>
25515 const bool strict =
true,
25516 const bool allow_exceptions =
true)
25525 template<
typename T>
25529 const bool strict =
true,
25530 const bool allow_exceptions =
true)
25538 const bool strict =
true,
25539 const bool allow_exceptions =
true)
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661 reference
at(
const json_pointer& ptr)
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704 const_reference
at(
const json_pointer& ptr)
const
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25843 if (
op ==
"remove")
25847 if (
op ==
"replace")
25981 const auto error_msg = (
op ==
"op") ?
"operation" :
"operation '" +
op +
"'";
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26136 const std::string& path =
"")
26152 {
"op",
"replace"}, {
"path",
path}, {
"value",
target}
26194 {
"path",
path +
"/-"},
26222 {
"op",
"remove"}, {
"path",
path_key}
26236 {
"op",
"add"}, {
"path",
path_key},
26258 {
"op",
"replace"}, {
"path",
path}, {
"value",
target}
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26348
26349
26350
26351
26352
26353
26354
26376
26377
26378
26379
26393
26394
26395
26404#ifndef JSON_HAS_CPP_20
26407
26408
26409
26410
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26440 return nlohmann::json::parse(s, s + n);
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26459 return nlohmann::json::json_pointer(std::string(s, n));
26466#if defined(__clang__
)
26467#pragma clang diagnostic pop
26472#undef JSON_INTERNAL_CATCH
26476#undef JSON_PRIVATE_UNLESS_TESTED
26477#undef JSON_HAS_CPP_11
26478#undef JSON_HAS_CPP_14
26479#undef JSON_HAS_CPP_17
26480#undef JSON_HAS_CPP_20
26481#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION
26482#undef NLOHMANN_BASIC_JSON_TPL
26483#undef JSON_EXPLICIT
26488#undef JSON_HEDLEY_ALWAYS_INLINE
26489#undef JSON_HEDLEY_ARM_VERSION
26490#undef JSON_HEDLEY_ARM_VERSION_CHECK
26491#undef JSON_HEDLEY_ARRAY_PARAM
26492#undef JSON_HEDLEY_ASSUME
26493#undef JSON_HEDLEY_BEGIN_C_DECLS
26494#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE
26495#undef JSON_HEDLEY_CLANG_HAS_BUILTIN
26496#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
26497#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE
26498#undef JSON_HEDLEY_CLANG_HAS_EXTENSION
26499#undef JSON_HEDLEY_CLANG_HAS_FEATURE
26500#undef JSON_HEDLEY_CLANG_HAS_WARNING
26501#undef JSON_HEDLEY_COMPCERT_VERSION
26502#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK
26503#undef JSON_HEDLEY_CONCAT
26504#undef JSON_HEDLEY_CONCAT3
26505#undef JSON_HEDLEY_CONCAT3_EX
26506#undef JSON_HEDLEY_CONCAT_EX
26507#undef JSON_HEDLEY_CONST
26508#undef JSON_HEDLEY_CONSTEXPR
26509#undef JSON_HEDLEY_CONST_CAST
26510#undef JSON_HEDLEY_CPP_CAST
26511#undef JSON_HEDLEY_CRAY_VERSION
26512#undef JSON_HEDLEY_CRAY_VERSION_CHECK
26513#undef JSON_HEDLEY_C_DECL
26514#undef JSON_HEDLEY_DEPRECATED
26515#undef JSON_HEDLEY_DEPRECATED_FOR
26516#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
26517#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
26518#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
26519#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
26520#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
26521#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
26522#undef JSON_HEDLEY_DIAGNOSTIC_POP
26523#undef JSON_HEDLEY_DIAGNOSTIC_PUSH
26524#undef JSON_HEDLEY_DMC_VERSION
26525#undef JSON_HEDLEY_DMC_VERSION_CHECK
26526#undef JSON_HEDLEY_EMPTY_BASES
26527#undef JSON_HEDLEY_EMSCRIPTEN_VERSION
26528#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
26529#undef JSON_HEDLEY_END_C_DECLS
26530#undef JSON_HEDLEY_FLAGS
26531#undef JSON_HEDLEY_FLAGS_CAST
26532#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE
26533#undef JSON_HEDLEY_GCC_HAS_BUILTIN
26534#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
26535#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
26536#undef JSON_HEDLEY_GCC_HAS_EXTENSION
26537#undef JSON_HEDLEY_GCC_HAS_FEATURE
26538#undef JSON_HEDLEY_GCC_HAS_WARNING
26539#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
26540#undef JSON_HEDLEY_GCC_VERSION
26541#undef JSON_HEDLEY_GCC_VERSION_CHECK
26542#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE
26543#undef JSON_HEDLEY_GNUC_HAS_BUILTIN
26544#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
26545#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
26546#undef JSON_HEDLEY_GNUC_HAS_EXTENSION
26547#undef JSON_HEDLEY_GNUC_HAS_FEATURE
26548#undef JSON_HEDLEY_GNUC_HAS_WARNING
26549#undef JSON_HEDLEY_GNUC_VERSION
26550#undef JSON_HEDLEY_GNUC_VERSION_CHECK
26551#undef JSON_HEDLEY_HAS_ATTRIBUTE
26552#undef JSON_HEDLEY_HAS_BUILTIN
26553#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE
26554#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS
26555#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
26556#undef JSON_HEDLEY_HAS_EXTENSION
26557#undef JSON_HEDLEY_HAS_FEATURE
26558#undef JSON_HEDLEY_HAS_WARNING
26559#undef JSON_HEDLEY_IAR_VERSION
26560#undef JSON_HEDLEY_IAR_VERSION_CHECK
26561#undef JSON_HEDLEY_IBM_VERSION
26562#undef JSON_HEDLEY_IBM_VERSION_CHECK
26563#undef JSON_HEDLEY_IMPORT
26564#undef JSON_HEDLEY_INLINE
26565#undef JSON_HEDLEY_INTEL_CL_VERSION
26566#undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK
26567#undef JSON_HEDLEY_INTEL_VERSION
26568#undef JSON_HEDLEY_INTEL_VERSION_CHECK
26569#undef JSON_HEDLEY_IS_CONSTANT
26570#undef JSON_HEDLEY_IS_CONSTEXPR_
26571#undef JSON_HEDLEY_LIKELY
26572#undef JSON_HEDLEY_MALLOC
26573#undef JSON_HEDLEY_MCST_LCC_VERSION
26574#undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK
26575#undef JSON_HEDLEY_MESSAGE
26576#undef JSON_HEDLEY_MSVC_VERSION
26577#undef JSON_HEDLEY_MSVC_VERSION_CHECK
26578#undef JSON_HEDLEY_NEVER_INLINE
26579#undef JSON_HEDLEY_NON_NULL
26580#undef JSON_HEDLEY_NO_ESCAPE
26581#undef JSON_HEDLEY_NO_RETURN
26582#undef JSON_HEDLEY_NO_THROW
26583#undef JSON_HEDLEY_NULL
26584#undef JSON_HEDLEY_PELLES_VERSION
26585#undef JSON_HEDLEY_PELLES_VERSION_CHECK
26586#undef JSON_HEDLEY_PGI_VERSION
26587#undef JSON_HEDLEY_PGI_VERSION_CHECK
26588#undef JSON_HEDLEY_PREDICT
26589#undef JSON_HEDLEY_PRINTF_FORMAT
26590#undef JSON_HEDLEY_PRIVATE
26591#undef JSON_HEDLEY_PUBLIC
26592#undef JSON_HEDLEY_PURE
26593#undef JSON_HEDLEY_REINTERPRET_CAST
26594#undef JSON_HEDLEY_REQUIRE
26595#undef JSON_HEDLEY_REQUIRE_CONSTEXPR
26596#undef JSON_HEDLEY_REQUIRE_MSG
26597#undef JSON_HEDLEY_RESTRICT
26598#undef JSON_HEDLEY_RETURNS_NON_NULL
26599#undef JSON_HEDLEY_SENTINEL
26600#undef JSON_HEDLEY_STATIC_ASSERT
26601#undef JSON_HEDLEY_STATIC_CAST
26602#undef JSON_HEDLEY_STRINGIFY
26603#undef JSON_HEDLEY_STRINGIFY_EX
26604#undef JSON_HEDLEY_SUNPRO_VERSION
26605#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK
26606#undef JSON_HEDLEY_TINYC_VERSION
26607#undef JSON_HEDLEY_TINYC_VERSION_CHECK
26608#undef JSON_HEDLEY_TI_ARMCL_VERSION
26609#undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK
26610#undef JSON_HEDLEY_TI_CL2000_VERSION
26611#undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK
26612#undef JSON_HEDLEY_TI_CL430_VERSION
26613#undef JSON_HEDLEY_TI_CL430_VERSION_CHECK
26614#undef JSON_HEDLEY_TI_CL6X_VERSION
26615#undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK
26616#undef JSON_HEDLEY_TI_CL7X_VERSION
26617#undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK
26618#undef JSON_HEDLEY_TI_CLPRU_VERSION
26619#undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK
26620#undef JSON_HEDLEY_TI_VERSION
26621#undef JSON_HEDLEY_TI_VERSION_CHECK
26622#undef JSON_HEDLEY_UNAVAILABLE
26623#undef JSON_HEDLEY_UNLIKELY
26624#undef JSON_HEDLEY_UNPREDICTABLE
26625#undef JSON_HEDLEY_UNREACHABLE
26626#undef JSON_HEDLEY_UNREACHABLE_RETURN
26627#undef JSON_HEDLEY_VERSION
26628#undef JSON_HEDLEY_VERSION_DECODE_MAJOR
26629#undef JSON_HEDLEY_VERSION_DECODE_MINOR
26630#undef JSON_HEDLEY_VERSION_DECODE_REVISION
26631#undef JSON_HEDLEY_VERSION_ENCODE
26632#undef JSON_HEDLEY_WARNING
26633#undef JSON_HEDLEY_WARN_UNUSED_RESULT
26634#undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG
26635#undef JSON_HEDLEY_FALL_THROUGH
std::string GetApiName() override
std::unique_ptr< ArkApi::IApiUtils > & GetApiUtils() override
static void LoadPluginCmd(APlayerController *, FString *, bool)
std::unique_ptr< ArkApi::IHooks > & GetHooks() override
std::unique_ptr< ArkApi::IApiUtils > api_utils_
void RegisterCommands() override
float GetVersion() override
std::unique_ptr< ArkApi::ICommands > & GetCommands() override
~ArkBaseApi() override=default
static FString LoadPlugin(FString *cmd)
static void UnloadPluginRcon(RCONClientConnection *, RCONPacket *, UWorld *)
std::unique_ptr< ArkApi::ICommands > commands_
static void UnloadPluginCmd(APlayerController *, FString *, bool)
static void LoadPluginRcon(RCONClientConnection *, RCONPacket *, UWorld *)
std::unique_ptr< ArkApi::IHooks > hooks_
static FString UnloadPlugin(FString *cmd)
BitField GetBitField(const void *base, const std::string &name)
DWORD64 GetAddress(const void *base, const std::string &name)
Offsets & operator=(const Offsets &)=delete
LPVOID GetDataAddress(const std::string &name)
std::unordered_map< std::string, BitField > bitfields_dump_
Offsets(const Offsets &)=delete
void Init(std::unordered_map< std::string, intptr_t > &&offsets_dump, std::unordered_map< std::string, BitField > &&bitfields_dump)
Offsets(Offsets &&)=delete
BitField GetBitFieldInternal(const void *base, const std::string &name)
LPVOID GetAddress(const std::string &name)
BitField GetBitField(LPVOID base, const std::string &name)
std::unordered_map< std::string, intptr_t > offsets_dump_
Offsets & operator=(Offsets &&)=delete
void DumpType(IDiaSymbol *, const std::string &, int) const
std::unordered_set< uint32_t > visited_
std::unordered_map< std::string, BitField > * bitfields_dump_
void DumpFunctions(IDiaSymbol *)
static void LoadDataFromPdb(const std::wstring &, IDiaDataSource **, IDiaSession **, IDiaSymbol **)
std::unordered_map< std::string, intptr_t > * offsets_dump_
static uint32_t GetSymbolId(IDiaSymbol *)
void DumpData(IDiaSymbol *, const std::string &) const
void DumpGlobalVariables(IDiaSymbol *)
void Read(const std::wstring &path, std::unordered_map< std::string, intptr_t > *offsets_dump, std::unordered_map< std::string, BitField > *bitfields_dump)
void DumpStructs(IDiaSymbol *)
static void Cleanup(IDiaSymbol *, IDiaSession *, IDiaDataSource *)
static std::string GetSymbolNameString(IDiaSymbol *)
static PluginManager & Get()
std::shared_ptr< Plugin > & LoadPlugin(const std::string &plugin_name) noexcept(false)
Load plugin by it's name.
void UnloadPlugin(const std::string &plugin_name) noexcept(false)
Unload plugin by it's name. Plugin must free all used resources.
virtual void AddRconCommand(const FString &command, const std::function< void(RCONClientConnection *, RCONPacket *, UWorld *)> &callback)=0
Adds a rcon command.
virtual void AddConsoleCommand(const FString &command, const std::function< void(APlayerController *, FString *, bool)> &callback)=0
Adds a console command.
static const FColor Green
FORCEINLINE const TCHAR * operator*() const
number_unsigned_t number_unsigned
number (unsigned integer)
const_reference operator[](const json_pointer &ptr) const
access specified element via JSON Pointer
reference operator[](const json_pointer &ptr)
access specified element via JSON Pointer
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
basic_json(const value_t v)
create an empty value with a given type
static std::vector< std::uint8_t > to_bson(const basic_json &j)
Serializes the given JSON object j to BSON and returns a vector containing the corresponding BSON-rep...
static std::vector< std::uint8_t > to_msgpack(const basic_json &j)
create a MessagePack serialization of a given JSON value
json_value(object_t &&value)
constructor for rvalue objects
static std::vector< std::uint8_t > to_cbor(const basic_json &j)
create a CBOR serialization of a given JSON value
json_value(number_float_t v) noexcept
constructor for numbers (floating-point)
void assert_invariant(bool check_parents=true) const noexcept
checks the class invariants
json_value(string_t &&value)
constructor for rvalue strings
json_value(number_integer_t v) noexcept
constructor for numbers (integer)
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json meta()
returns version information on the library
json_value(number_unsigned_t v) noexcept
constructor for numbers (unsigned)
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)
Create a JSON value from an input in BSON format.
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(InputType &&i, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
create a JSON value from an input in CBOR format
static void to_bson(const basic_json &j, detail::output_adapter< std::uint8_t > o)
Serializes the given JSON object j to BSON and forwards the corresponding BSON-representation to the ...
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
Create a JSON value from an input in BSON format.
json_value(value_t t)
constructor for empty values of a given type
friend struct detail::external_constructor
static std::vector< std::uint8_t > to_ubjson(const basic_json &j, const bool use_size=false, const bool use_type=false)
create a UBJSON serialization of a given JSON value
json_value m_value
the value of the current element
json_value(const string_t &value)
constructor for strings
json_value(const binary_t &value)
constructor for binary arrays (internal type)
json_value(const array_t &value)
constructor for arrays
const_reference at(const json_pointer &ptr) const
access specified element via JSON Pointer
void merge_patch(const basic_json &apply_patch)
applies a JSON Merge Patch
json_value(const object_t &value)
constructor for objects
json_value(typename binary_t::container_type &&value)
constructor for rvalue binary arrays
json_value(boolean_t v) noexcept
constructor for booleans
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in MessagePack format
static JSON_HEDLEY_RETURNS_NON_NULL T * create(Args &&... args)
helper for exception-safe object creation
binary_t * binary
binary (stored with pointer to save storage)
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_ubjson(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in UBJSON format
reference at(const json_pointer &ptr)
access specified element via JSON Pointer
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_ubjson(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in UBJSON format
static void to_ubjson(const basic_json &j, detail::output_adapter< std::uint8_t > o, const bool use_size=false, const bool use_type=false)
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_ubjson(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)
basic_json flatten() const
return flattened JSON value
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
create a JSON value from an input in CBOR format
json_value(const typename binary_t::container_type &value)
constructor for binary arrays
json_value()=default
default constructor (for null values)
number_float_t number_float
number (floating-point)
string_t * string
string (stored with pointer to save storage)
static void to_cbor(const basic_json &j, detail::output_adapter< std::uint8_t > o)
json_value(binary_t &&value)
constructor for rvalue binary arrays (internal type)
basic_json(std::nullptr_t=nullptr) noexcept
create a null object
array_t * array
array (stored with pointer to save storage)
number_integer_t number_integer
number (integer)
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in MessagePack format
basic_json patch(const basic_json &json_patch) const
applies a JSON patch
basic_json(CompatibleType &&val) noexcept(noexcept(//NOLINT(bugprone-forwarding-reference-overload, bugprone-exception-escape) JSONSerializer< U >::to_json(std::declval< basic_json_t & >(), std::forward< CompatibleType >(val))))
create a JSON value
basic_json unflatten() const
unflatten a previously flattened JSON value
reference set_parent(reference j, std::size_t old_capacity=std::size_t(-1))
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)
json_value(array_t &&value)
constructor for rvalue arrays
static void to_msgpack(const basic_json &j, detail::output_adapter< std::uint8_t > o)
static allocator_type get_allocator()
returns the allocator associated with the container
an internal type for a backed binary type
byte_container_with_subtype(const container_type &b, subtype_type subtype_) noexcept(noexcept(container_type(b)))
byte_container_with_subtype(const container_type &b) noexcept(noexcept(container_type(b)))
byte_container_with_subtype(container_type &&b) noexcept(noexcept(container_type(std::move(b))))
bool operator!=(const byte_container_with_subtype &rhs) const
void clear_subtype() noexcept
clears the binary subtype
byte_container_with_subtype() noexcept(noexcept(container_type()))
byte_container_with_subtype(container_type &&b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b))))
constexpr bool has_subtype() const noexcept
return whether the value has a subtype
void set_subtype(subtype_type subtype_) noexcept
sets the binary subtype
constexpr subtype_type subtype() const noexcept
return the binary subtype
bool operator==(const byte_container_with_subtype &rhs) const
deserialization of CBOR, MessagePack, and UBJSON values
bool get_msgpack_array(const std::size_t len)
binary_reader & operator=(const binary_reader &)=delete
bool get_bson_string(const NumberType len, string_t &result)
Parses a zero-terminated string of length len from the BSON input.
bool parse_bson_array()
Reads an array from the BSON input and passes it to the SAX-parser.
char_int_type get_ignore_noop()
bool get_ubjson_high_precision_number()
binary_reader(InputAdapterType &&adapter) noexcept
create a binary reader
bool get_bson_cstr(string_t &result)
Parses a C-style string from the BSON input.
bool get_cbor_array(const std::size_t len, const cbor_tag_handler_t tag_handler)
bool get_msgpack_binary(binary_t &result)
reads a MessagePack byte array
bool get_cbor_object(const std::size_t len, const cbor_tag_handler_t tag_handler)
bool get_ubjson_string(string_t &result, const bool get_char=true)
reads a UBJSON string
bool parse_bson_element_list(const bool is_array)
Read a BSON element list (as specified in the BSON-spec)
bool parse_cbor_internal(const bool get_char, const cbor_tag_handler_t tag_handler)
bool get_string(const input_format_t format, const NumberType len, string_t &result)
create a string by reading characters from the input
bool get_cbor_string(string_t &result)
reads a CBOR string
InputAdapterType ia
input adapter
bool get_binary(const input_format_t format, const NumberType len, binary_t &result)
create a byte array by reading bytes from the input
bool parse_ubjson_internal(const bool get_char=true)
bool unexpect_eof(const input_format_t format, const char *context) const
binary_reader & operator=(binary_reader &&)=default
std::string get_token_string() const
bool get_msgpack_object(const std::size_t len)
bool get_bson_binary(const NumberType len, binary_t &result)
Parses a byte array input of length len from the BSON input.
std::size_t chars_read
the number of characters read
binary_reader(const binary_reader &)=delete
char_int_type current
the current character
bool sax_parse(const input_format_t format, json_sax_t *sax_, const bool strict=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
json_sax_t * sax
the SAX parser
bool get_ubjson_size_value(std::size_t &result)
bool parse_bson_internal()
Reads in a BSON-object and passes it to the SAX-parser.
bool get_number(const input_format_t format, NumberType &result)
bool get_cbor_binary(binary_t &result)
reads a CBOR byte array
binary_reader(binary_reader &&)=default
char_int_type get()
get next character from the input
const bool is_little_endian
whether we can assume little endianess
bool get_msgpack_string(string_t &result)
reads a MessagePack string
bool parse_msgpack_internal()
serialization to CBOR and MessagePack values
void write_bson_array(const string_t &name, const typename BasicJsonType::array_t &value)
Writes a BSON element with key name and array value.
void write_ubjson(const BasicJsonType &j, const bool use_count, const bool use_type, const bool add_prefix=true)
static std::size_t calc_bson_entry_header_size(const string_t &name, const BasicJsonType &j)
void write_bson_entry_header(const string_t &name, const std::uint8_t element_type)
Writes the given element_type and name to the output adapter.
static std::size_t calc_bson_element_size(const string_t &name, const BasicJsonType &j)
Calculates the size necessary to serialize the JSON value j with its name.
void write_bson_double(const string_t &name, const double value)
Writes a BSON element with key name and double value value.
void write_bson_object(const typename BasicJsonType::object_t &value)
static constexpr CharType get_cbor_float_prefix(float)
static constexpr CharType get_msgpack_float_prefix(double)
void write_bson_integer(const string_t &name, const std::int64_t value)
Writes a BSON element with key name and integer value.
void write_bson_string(const string_t &name, const string_t &value)
Writes a BSON element with key name and string value value.
void write_bson_object_entry(const string_t &name, const typename BasicJsonType::object_t &value)
Writes a BSON element with key name and object value.
output_adapter_t< CharType > oa
the output
void write_bson_element(const string_t &name, const BasicJsonType &j)
Serializes the JSON value j to BSON and associates it with the key name.
void write_bson_binary(const string_t &name, const binary_t &value)
Writes a BSON element with key name and binary value value.
void write_bson_null(const string_t &name)
Writes a BSON element with key name and null value.
static std::size_t calc_bson_binary_size(const typename BasicJsonType::binary_t &value)
void write_bson(const BasicJsonType &j)
void write_cbor(const BasicJsonType &j)
static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept
void write_bson_unsigned(const string_t &name, const BasicJsonType &j)
Writes a BSON element with key name and unsigned value.
static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t &value)
Calculates the size of the BSON serialization of the given JSON-object j.
static constexpr CharType get_msgpack_float_prefix(float)
void write_bson_boolean(const string_t &name, const bool value)
Writes a BSON element with key name and boolean value value.
void write_msgpack(const BasicJsonType &j)
static std::size_t calc_bson_string_size(const string_t &value)
static std::size_t calc_bson_integer_size(const std::int64_t value)
static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t &value)
static constexpr CharType get_cbor_float_prefix(double)
general exception of the basic_json class
const int id
the id of the exception
std::runtime_error m
an exception object as storage for error messages
const char * what() const noexcept override
returns the explanatory string
exception(int id_, const char *what_arg)
exception indicating errors with iterators
invalid_iterator(int id_, const char *what_arg)
a template for a bidirectional iterator for the basic_json class This class implements a both iterato...
bool operator<(const iter_impl &other) const
comparison: smaller
iter_impl operator-(difference_type i) const
subtract from iterator
bool operator!=(const IterImpl &other) const
comparison: not equal
iter_impl const operator--(int)
post-decrement (it–)
void set_end() noexcept
set the iterator past the last value
iter_impl & operator=(iter_impl &&) noexcept=default
iter_impl & operator--()
pre-decrement (–it)
difference_type operator-(const iter_impl &other) const
return difference
iter_impl & operator=(const iter_impl< const BasicJsonType > &other) noexcept
converting assignment
reference operator*() const
return a reference to the value pointed to by the iterator
iter_impl(iter_impl &&) noexcept=default
bool operator>=(const iter_impl &other) const
comparison: greater than or equal
pointer operator->() const
dereference the iterator
iter_impl(const iter_impl< const BasicJsonType > &other) noexcept
const copy constructor
iter_impl const operator++(int)
post-increment (it++)
iter_impl operator+(difference_type i) const
add to iterator
friend iter_impl operator+(difference_type i, const iter_impl &it)
addition of distance and iterator
const object_t::key_type & key() const
return the key of an object iterator
bool operator==(const IterImpl &other) const
comparison: equal
bool operator>(const iter_impl &other) const
comparison: greater than
reference value() const
return the value of an iterator
iter_impl & operator++()
pre-increment (++it)
reference operator[](difference_type n) const
access to successor
bool operator<=(const iter_impl &other) const
comparison: less than or equal
iter_impl & operator+=(difference_type i)
add to iterator
iter_impl & operator-=(difference_type i)
subtract from iterator
IteratorType anchor
the iterator
const string_type empty_str
an empty string (to return a reference for primitive values)
iteration_proxy_value(IteratorType it) noexcept
bool operator!=(const iteration_proxy_value &o) const
inequality operator (needed for range-based for)
std::size_t array_index_last
last stringified array index
string_type array_index_str
a string representation of the array index
IteratorType::reference value() const
return value of the iterator
iteration_proxy_value & operator++()
increment operator (needed for range-based for)
std::size_t array_index
an index for arrays (used to create key names)
iteration_proxy_value & operator*()
dereference operator (needed for range-based for)
const string_type & key() const
return key of the iterator
bool operator==(const iteration_proxy_value &o) const
equality operator (needed for InputIterator)
proxy class for the items() function
iteration_proxy_value< IteratorType > begin() noexcept
return iterator begin (needed for range-based for)
iteration_proxy_value< IteratorType > end() noexcept
return iterator end (needed for range-based for)
IteratorType::reference container
the container to iterate
iteration_proxy(typename IteratorType::reference cont) noexcept
construct iteration proxy from a container
json_ref & operator=(const json_ref &)=delete
value_type const * value_ref
json_ref(const json_ref &)=delete
value_type const & operator*() const
json_ref(Args &&... args)
json_ref(const value_type &value)
value_type const * operator->() const
json_ref & operator=(json_ref &&)=delete
json_ref(value_type &&value)
value_type moved_or_copied() const
a template for a reverse iterator class
json_reverse_iterator const operator--(int)
post-decrement (it–)
json_reverse_iterator operator-(difference_type i) const
subtract from iterator
json_reverse_iterator & operator+=(difference_type i)
add to iterator
reference operator[](difference_type n) const
access to successor
difference_type operator-(const json_reverse_iterator &other) const
return difference
json_reverse_iterator operator+(difference_type i) const
add to iterator
json_reverse_iterator const operator++(int)
post-increment (it++)
auto key() const -> decltype(std::declval< Base >().key())
return the key of an object iterator
json_reverse_iterator & operator--()
pre-decrement (–it)
reference value() const
return the value of an iterator
json_reverse_iterator & operator++()
pre-increment (++it)
bool start_object(std::size_t=std::size_t(-1))
bool start_array(std::size_t=std::size_t(-1))
bool number_integer(number_integer_t)
bool number_unsigned(number_unsigned_t)
bool number_float(number_float_t, const string_t &)
json_sax_dom_callback_parser & operator=(const json_sax_dom_callback_parser &)=delete
bool start_object(std::size_t len)
const bool allow_exceptions
whether to throw exceptions in case of errors
constexpr bool is_errored() const
BasicJsonType * object_element
helper to hold the reference for the next object element
const parser_callback_t callback
callback function
bool start_array(std::size_t len)
~json_sax_dom_callback_parser()=default
json_sax_dom_callback_parser(const json_sax_dom_callback_parser &)=delete
bool binary(binary_t &val)
bool number_integer(number_integer_t val)
BasicJsonType & root
the parsed JSON value
std::vector< BasicJsonType * > ref_stack
stack to model hierarchy of values
BasicJsonType discarded
a discarded value for the callback
std::vector< bool > key_keep_stack
stack to manage which object keys to keep
bool errored
whether a syntax error occurred
std::vector< bool > keep_stack
stack to manage which values to keep
bool number_unsigned(number_unsigned_t val)
json_sax_dom_callback_parser & operator=(json_sax_dom_callback_parser &&)=default
bool string(string_t &val)
bool number_float(number_float_t val, const string_t &)
json_sax_dom_callback_parser(json_sax_dom_callback_parser &&)=default
json_sax_dom_callback_parser(BasicJsonType &r, const parser_callback_t cb, const bool allow_exceptions_=true)
SAX implementation to create a JSON value from SAX events.
bool start_array(std::size_t len)
json_sax_dom_parser(const json_sax_dom_parser &)=delete
json_sax_dom_parser & operator=(json_sax_dom_parser &&)=default
bool number_unsigned(number_unsigned_t val)
bool errored
whether a syntax error occurred
~json_sax_dom_parser()=default
JSON_HEDLEY_RETURNS_NON_NULL BasicJsonType * handle_value(Value &&v)
bool string(string_t &val)
bool start_object(std::size_t len)
BasicJsonType * object_element
helper to hold the reference for the next object element
std::vector< BasicJsonType * > ref_stack
stack to model hierarchy of values
bool binary(binary_t &val)
const bool allow_exceptions
whether to throw exceptions in case of errors
constexpr bool is_errored() const
json_sax_dom_parser(json_sax_dom_parser &&)=default
json_sax_dom_parser & operator=(const json_sax_dom_parser &)=delete
BasicJsonType & root
the parsed JSON value
bool number_float(number_float_t val, const string_t &)
json_sax_dom_parser(BasicJsonType &r, const bool allow_exceptions_=true)
bool number_integer(number_integer_t val)
JSON_HEDLEY_RETURNS_NON_NULL static JSON_HEDLEY_CONST const char * token_type_name(const token_type t) noexcept
return name of values of type token_type (only used for errors)
token_type
token types for the parser
@ value_float
an floating point number – use get_number_float() for actual value
@ begin_array
the character for array begin [
@ value_string
a string – use get_string() for actual value
@ end_array
the character for array end ]
@ uninitialized
indicating the scanner is uninitialized
@ parse_error
indicating a parse error
@ value_integer
a signed integer – use get_number_integer() for actual value
@ value_separator
the value separator ,
@ end_object
the character for object end }
@ literal_true
the true literal
@ begin_object
the character for object begin {
@ value_unsigned
an unsigned integer – use get_number_unsigned() for actual value
@ literal_null
the null literal
@ end_of_input
indicating the end of the input buffer
@ name_separator
the name separator :
@ literal_or_value
a literal or the begin of a value (only for diagnostics)
@ literal_false
the false literal
string_t & get_string()
return current string value (implicitly resets the token; useful only once)
number_float_t value_float
const bool ignore_comments
whether comments should be ignored (true) or signaled as errors (false)
void reset() noexcept
reset token_buffer; current character is beginning of token
bool next_unget
whether the next get() call should just return current
char_int_type current
the current character
static JSON_HEDLEY_PURE char get_decimal_point() noexcept
return the locale-dependent decimal point
number_integer_t value_integer
InputAdapterType ia
input adapter
lexer & operator=(lexer &&)=default
static void strtof(float &f, const char *str, char **endptr) noexcept
const char_int_type decimal_point_char
the decimal point
bool skip_bom()
skip the UTF-8 byte order mark
const char * error_message
a description of occurred lexer errors
lexer(InputAdapterType &&adapter, bool ignore_comments_=false) noexcept
position_t position
the start position of the current token
constexpr position_t get_position() const noexcept
return position of last read token
std::vector< char_type > token_string
raw input token string (for error messages)
constexpr number_integer_t get_number_integer() const noexcept
return integer value
token_type scan_number()
scan a number literal
lexer & operator=(lexer &)=delete
void unget()
unget current character (read it again on next get)
token_type scan_string()
scan a string literal
lexer(const lexer &)=delete
constexpr number_unsigned_t get_number_unsigned() const noexcept
return unsigned integer value
string_t token_buffer
buffer for variable-length tokens (numbers, strings)
static void strtof(double &f, const char *str, char **endptr) noexcept
token_type scan_literal(const char_type *literal_text, const std::size_t length, token_type return_type)
constexpr number_float_t get_number_float() const noexcept
return floating-point value
int get_codepoint()
get codepoint from 4 hex characters following \u
std::string get_token_string() const
static void strtof(long double &f, const char *str, char **endptr) noexcept
number_unsigned_t value_unsigned
bool scan_comment()
scan a comment
JSON_HEDLEY_RETURNS_NON_NULL constexpr const char * get_error_message() const noexcept
return syntax error message
exception indicating other library errors
other_error(int id_, const char *what_arg)
exception indicating access out of the defined range
out_of_range(int id_, const char *what_arg)
output_adapter(std::basic_ostream< CharType > &s)
output_adapter(StringType &s)
output adapter for output streams
void write_character(CharType c) override
std::basic_ostream< CharType > & stream
void write_characters(const CharType *s, std::size_t length) override
output_stream_adapter(std::basic_ostream< CharType > &s) noexcept
output adapter for basic_string
void write_character(CharType c) override
void write_characters(const CharType *s, std::size_t length) override
output_string_adapter(StringType &s) noexcept
output adapter for byte vectors
std::vector< CharType > & v
void write_characters(const CharType *s, std::size_t length) override
void write_character(CharType c) override
exception indicating a parse error
parse_error(int id_, std::size_t byte_, const char *what_arg)
const std::size_t byte
byte index of the parse error
static std::string position_string(const position_t &pos)
bool sax_parse(SAX *sax, const bool strict=true)
token_type get_token()
get next token from lexer
token_type last_token
the type of the last read token
bool accept(const bool strict=true)
public accept interface
bool sax_parse_internal(SAX *sax)
const parser_callback_t< BasicJsonType > callback
callback function
void parse(const bool strict, BasicJsonType &result)
public parser interface
const bool allow_exceptions
whether to throw exceptions in case of errors
primitive_iterator_t operator+(difference_type n) noexcept
primitive_iterator_t & operator++() noexcept
constexpr bool is_end() const noexcept
return whether the iterator is at end
primitive_iterator_t & operator-=(difference_type n) noexcept
constexpr bool is_begin() const noexcept
return whether the iterator can be dereferenced
friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
void set_begin() noexcept
set iterator to a defined beginning
primitive_iterator_t const operator++(int) noexcept
static constexpr difference_type end_value
friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
primitive_iterator_t & operator--() noexcept
void set_end() noexcept
set iterator to a defined past the end
constexpr difference_type get_value() const noexcept
primitive_iterator_t const operator--(int) noexcept
primitive_iterator_t & operator+=(difference_type n) noexcept
static constexpr difference_type begin_value
const error_handler_t error_handler
error_handler how to react on decoding errors
const std::lconv * loc
the locale
std::array< char, 64 > number_buffer
a (hopefully) large enough character buffer
static constexpr std::uint8_t UTF8_ACCEPT
serializer(serializer &&)=delete
serializer & operator=(serializer &&)=delete
const char decimal_point
the locale's decimal point character
const char thousands_sep
the locale's thousand separator character
serializer & operator=(const serializer &)=delete
static constexpr std::uint8_t UTF8_REJECT
void dump(const BasicJsonType &val, const bool pretty_print, const bool ensure_ascii, const unsigned int indent_step, const unsigned int current_indent=0)
internal implementation of the serialization function
const char indent_char
the indentation character
std::array< char, 512 > string_buffer
string buffer
JSON_PRIVATE_UNLESS_TESTED const bool ensure_ascii
serializer(const serializer &)=delete
string_t indent_string
the indentation string
exception indicating executing a member function with a wrong type
type_error(int id_, const char *what_arg)
std::string to_string() const
return a string representation of the JSON pointer
#define JSON_HEDLEY_PGI_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49)
#define NLOHMANN_BASIC_JSON_TPL_DECLARATION
#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36)
#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43)
#define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major, minor, patch)
#define JSON_HEDLEY_CONST
#define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major, minor, patch)
#define JSON_HEDLEY_DIAGNOSTIC_PUSH
#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40)
#define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61)
#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62)
#define JSON_USE_IMPLICIT_CONVERSIONS
#define JSON_HEDLEY_UNPREDICTABLE(expr)
#define JSON_HEDLEY_WARN_UNUSED_RESULT
#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45)
#define JSON_PRIVATE_UNLESS_TESTED
#define JSON_HEDLEY_UNREACHABLE()
#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)
#define NLOHMANN_JSON_VERSION_PATCH
#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21)
#define NLOHMANN_JSON_TO(v1)
#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24)
#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35)
#define JSON_HEDLEY_LIKELY(expr)
#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33)
#define JSON_HEDLEY_IS_CONSTANT(expr)
#define JSON_HEDLEY_TINYC_VERSION_CHECK(major, minor, patch)
#define JSON_HEDLEY_TI_VERSION_CHECK(major, minor, patch)
nlohmann::json::json_pointer operator""_json_pointer(const char *s, std::size_t n)
user-defined string literal for JSON pointer
#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28)
#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57)
#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16)
#define JSON_HEDLEY_HAS_WARNING(warning)
#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55)
#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4)
#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50)
#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29)
#define JSON_HEDLEY_NON_NULL(...)
#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3)
#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x)
#define JSON_INTERNAL_CATCH(exception)
#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11)
#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27)
#define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major, minor, patch)
#define JSON_HEDLEY_CRAY_VERSION_CHECK(major, minor, patch)
#define JSON_HEDLEY_RETURNS_NON_NULL
#define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major, minor, patch)
#define JSON_HEDLEY_IBM_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE2(func, v1)
#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44)
#define JSON_CATCH(exception)
#define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major, minor, patch)
#define JSON_THROW(exception)
#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5)
#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51)
#define JSON_HEDLEY_ASSUME(expr)
#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58)
#define JSON_HEDLEY_HAS_FEATURE(feature)
#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56)
#define NLOHMANN_JSON_VERSION_MAJOR
#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18)
#define NLOHMANN_BASIC_JSON_TPL
#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52)
#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25)
#define JSON_HEDLEY_IAR_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_FROM(v1)
#define JSON_HEDLEY_UNLIKELY(expr)
#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13)
#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63)
#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14)
#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42)
#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7)
#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39)
#define NLOHMANN_JSON_PASTE(...)
#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26)
#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41)
#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37)
#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)
#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)
#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59)
#define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE3(func, v1, v2)
#define JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6)
#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32)
#define JSON_HEDLEY_GCC_HAS_WARNING(warning, major, minor, patch)
#define NLOHMANN_JSON_VERSION_MINOR
#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47)
#define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54)
#define JSON_HEDLEY_CONSTEXPR
#define JSON_HEDLEY_MSVC_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53)
#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22)
#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46)
#define JSON_HEDLEY_HAS_BUILTIN(builtin)
#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60)
#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9)
#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23)
#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48)
#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30)
#define JSON_HEDLEY_INTEL_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20)
nlohmann::json operator""_json(const char *s, std::size_t n)
user-defined string literal for JSON values
#define JSON_HEDLEY_PRAGMA(value)
#define JSON_HEDLEY_ARM_VERSION_CHECK(major, minor, patch)
#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8)
#define JSON_HEDLEY_DIAGNOSTIC_POP
#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34)
#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement)
#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31)
#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38)
#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute, major, minor, patch)
#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17)
#define JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
#define NLOHMANN_JSON_EXPAND(x)
#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...)
constexpr float api_version
IApiUtils & GetApiUtils()
constexpr const auto & to_json
constexpr const auto & from_json
implements the Grisu2 algorithm for binary to decimal floating-point conversion.
void grisu2(char *buf, int &len, int &decimal_exponent, diyfp m_minus, diyfp v, diyfp m_plus)
JSON_HEDLEY_RETURNS_NON_NULL char * format_buffer(char *buf, int len, int decimal_exponent, int min_exp, int max_exp)
prettify v = buf * 10^decimal_exponent
Target reinterpret_bits(const Source source)
boundaries compute_boundaries(FloatType value)
int find_largest_pow10(const std::uint32_t n, std::uint32_t &pow10)
void grisu2_round(char *buf, int len, std::uint64_t dist, std::uint64_t delta, std::uint64_t rest, std::uint64_t ten_k)
JSON_HEDLEY_RETURNS_NON_NULL char * append_exponent(char *buf, int e)
appends a decimal representation of e to buf
void grisu2_digit_gen(char *buffer, int &length, int &decimal_exponent, diyfp M_minus, diyfp w, diyfp M_plus)
void grisu2(char *buf, int &len, int &decimal_exponent, FloatType value)
cached_power get_cached_power_for_binary_exponent(int e)
detail namespace with internal helper functions
bool operator<(const value_t lhs, const value_t rhs) noexcept
comparison operator for JSON types
value_t
the JSON type enumeration
@ number_integer
number value (signed integer)
@ discarded
discarded by the parser callback function
@ binary
binary array (ordered collection of bytes)
@ object
object (unordered set of name/value pairs)
@ number_float
number value (floating-point)
@ number_unsigned
number value (unsigned integer)
@ array
array (ordered collection of values)
void from_json(const BasicJsonType &j, typename std::nullptr_t &n)
void int_to_string(string_type &target, std::size_t value)
JSON_HEDLEY_RETURNS_NON_NULL char * to_chars(char *first, const char *last, FloatType value)
generates a decimal representation of the floating-point number value in [first, last).
file_input_adapter input_adapter(std::FILE *file)
cbor_tag_handler_t
how to treat CBOR tags
@ store
store tags as binary type
@ error
throw a parse_error exception in case of a tag
@ value
the parser finished reading a JSON value
@ key
the parser read a key of a value in an object
@ array_end
the parser read ] and finished processing a JSON array
@ array_start
the parser read [ and started to process a JSON array
@ object_start
the parser read { and started to process a JSON object
@ object_end
the parser read } and finished processing a JSON object
error_handler_t
how to treat decoding errors
@ strict
throw a type_error exception in case of invalid UTF-8
@ ignore
ignore invalid UTF-8 sequences
@ replace
replace invalid UTF-8 sequences with U+FFFD
std::size_t combine(std::size_t seed, std::size_t h) noexcept
std::size_t hash(const BasicJsonType &j)
hash a JSON value
input_format_t
the supported input formats
auto get(const nlohmann::detail::iteration_proxy_value< IteratorType > &i) -> decltype(i.key())
static bool little_endianess(int num=1) noexcept
determine system byte order
namespace for Niels Lohmann
void SendMessageW(int Id, int Type, FString *OutGoingMessage)
static auto from_json(BasicJsonType &&j, TargetType &val) noexcept(noexcept(::nlohmann::from_json(std::forward< BasicJsonType >(j), val))) -> decltype(::nlohmann::from_json(std::forward< BasicJsonType >(j), val), void())
convert a JSON value to any value type
static auto from_json(BasicJsonType &&j) noexcept(noexcept(::nlohmann::from_json(std::forward< BasicJsonType >(j), detail::identity_tag< TargetType > {}))) -> decltype(::nlohmann::from_json(std::forward< BasicJsonType >(j), detail::identity_tag< TargetType > {}))
convert a JSON value to any value type
static auto to_json(BasicJsonType &j, TargetType &&val) noexcept(noexcept(::nlohmann::to_json(j, std::forward< TargetType >(val)))) -> decltype(::nlohmann::to_json(j, std::forward< TargetType >(val)), void())
convert any value type to a JSON value
static constexpr int kPrecision
static diyfp normalize(diyfp x) noexcept
normalize x such that the significand is >= 2^(q-1)
static diyfp normalize_to(const diyfp &x, const int target_exponent) noexcept
normalize x such that the result has the exponent E
static diyfp mul(const diyfp &x, const diyfp &y) noexcept
returns x * y
constexpr diyfp(std::uint64_t f_, int e_) noexcept
static diyfp sub(const diyfp &x, const diyfp &y) noexcept
returns x - y
static void construct(BasicJsonType &j, typename BasicJsonType::array_t &&arr)
static void construct(BasicJsonType &j, const typename BasicJsonType::array_t &arr)
static void construct(BasicJsonType &j, const typename BasicJsonType::binary_t &b)
static void construct(BasicJsonType &j, typename BasicJsonType::binary_t &&b)
static void construct(BasicJsonType &j, typename BasicJsonType::boolean_t b) noexcept
static void construct(BasicJsonType &j, typename BasicJsonType::number_float_t val) noexcept
static void construct(BasicJsonType &j, typename BasicJsonType::number_integer_t val) noexcept
static void construct(BasicJsonType &j, typename BasicJsonType::number_unsigned_t val) noexcept
static void construct(BasicJsonType &j, typename BasicJsonType::object_t &&obj)
static void construct(BasicJsonType &j, const typename BasicJsonType::object_t &obj)
static void construct(BasicJsonType &j, typename BasicJsonType::string_t &&s)
static void construct(BasicJsonType &j, const typename BasicJsonType::string_t &s)
primitive_iterator_t primitive_iterator
generic iterator for all other types
BasicJsonType::array_t::iterator array_iterator
iterator for JSON arrays
BasicJsonType::object_t::iterator object_iterator
iterator for JSON objects
static constexpr bool value
static one test(decltype(&C::capacity))
static constexpr bool value
nonesuch(nonesuch const &)=delete
void operator=(nonesuch &&)=delete
nonesuch(nonesuch const &&)=delete
void operator=(nonesuch const &)=delete
abstract output adapter interface
virtual void write_characters(const CharType *s, std::size_t length)=0
virtual void write_character(CharType c)=0
output_adapter_protocol & operator=(output_adapter_protocol &&) noexcept=default
output_adapter_protocol(output_adapter_protocol &&) noexcept=default
output_adapter_protocol & operator=(const output_adapter_protocol &)=default
virtual ~output_adapter_protocol()=default
output_adapter_protocol(const output_adapter_protocol &)=default
output_adapter_protocol()=default
struct to capture the start position of the current token
std::size_t lines_read
the number of lines read
std::size_t chars_read_current_line
the number of characters read in the current line
std::size_t chars_read_total
the total number of characters read
constexpr operator size_t() const
conversion to size_t to preserve SAX interface
virtual bool start_object(std::size_t elements)=0
the beginning of an object was read
virtual bool string(string_t &val)=0
a string was read
virtual bool null()=0
a null value was read
json_sax & operator=(json_sax &&) noexcept=default
virtual bool end_array()=0
the end of an array was read
virtual bool key(string_t &val)=0
an object key was read
virtual bool binary(binary_t &val)=0
a binary string was read
virtual bool start_array(std::size_t elements)=0
the beginning of an array was read
json_sax(json_sax &&) noexcept=default
virtual bool boolean(bool val)=0
a boolean value was read
json_sax(const json_sax &)=default
json_sax & operator=(const json_sax &)=default
virtual bool end_object()=0
the end of an object was read
virtual bool number_unsigned(number_unsigned_t val)=0
an unsigned integer number was read
virtual bool number_float(number_float_t val, const string_t &s)=0
an floating-point number was read
virtual ~json_sax()=default
virtual bool number_integer(number_integer_t val)=0
an integer number was read