diff --git a/runtime/src/shader_library.h b/runtime/src/shader_library.h index 7699dfbb0..97bf946c6 100644 --- a/runtime/src/shader_library.h +++ b/runtime/src/shader_library.h @@ -456,12 +456,9 @@ struct Json { double number = 0; std::string string; std::vector array; - // Declared through the incomplete JsonObjectEntry and destroyed out of line: a vector element type that holds a - // Json by value cannot be instantiated while Json is still being defined. GCC tolerates it, Clang with libstdc++ - // does not (the pair form used to fail to build there). Structured bindings still work. + // The forward declaration lets entries hold Json by value. Implicit special members let vectors move subtrees. std::vector object; - ~Json(); const Json* find(std::string_view key) const; }; @@ -470,8 +467,6 @@ struct JsonObjectEntry { Json value; }; -inline Json::~Json() = default; - inline const Json* Json::find(std::string_view key) const { for (const auto& [k, v] : object) if (k == key) return &v;