Commit ef24a4151b2456a392fde64a3493b06eadda6d36

Authored by Jay Berkenbilt
1 parent 293a2e52

Move JSON_array for C++-20 compatibility (fixes #943)

Showing 1 changed file with 12 additions and 10 deletions
include/qpdf/JSON.hh
... ... @@ -374,16 +374,7 @@ class JSON
374 374 std::map<std::string, JSON> members;
375 375 std::set<std::string> parsed_keys;
376 376 };
377   - struct JSON_array: public JSON_value
378   - {
379   - JSON_array() :
380   - JSON_value(vt_array)
381   - {
382   - }
383   - ~JSON_array() override = default;
384   - void write(Pipeline*, size_t depth) const override;
385   - std::vector<JSON> elements;
386   - };
  377 + struct JSON_array;
387 378 struct JSON_string: public JSON_value
388 379 {
389 380 JSON_string(std::string const& utf8);
... ... @@ -455,4 +446,15 @@ class JSON
455 446 std::shared_ptr<Members> m;
456 447 };
457 448  
  449 +struct JSON::JSON_array: public JSON_value
  450 +{
  451 + JSON_array() :
  452 + JSON_value(vt_array)
  453 + {
  454 + }
  455 + ~JSON_array() override = default;
  456 + void write(Pipeline*, size_t depth) const override;
  457 + std::vector<JSON> elements;
  458 +};
  459 +
458 460 #endif // JSON_HH
... ...