From ef24a4151b2456a392fde64a3493b06eadda6d36 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 20 May 2023 18:25:58 -0400 Subject: [PATCH] Move JSON_array for C++-20 compatibility (fixes #943) --- include/qpdf/JSON.hh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index 3ff714ae..ef820b66 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -374,16 +374,7 @@ class JSON std::map members; std::set parsed_keys; }; - struct JSON_array: public JSON_value - { - JSON_array() : - JSON_value(vt_array) - { - } - ~JSON_array() override = default; - void write(Pipeline*, size_t depth) const override; - std::vector elements; - }; + struct JSON_array; struct JSON_string: public JSON_value { JSON_string(std::string const& utf8); @@ -455,4 +446,15 @@ class JSON std::shared_ptr m; }; +struct JSON::JSON_array: public JSON_value +{ + JSON_array() : + JSON_value(vt_array) + { + } + ~JSON_array() override = default; + void write(Pipeline*, size_t depth) const override; + std::vector elements; +}; + #endif // JSON_HH