Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions runtime/src/shader_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,9 @@ struct Json {
double number = 0;
std::string string;
std::vector<Json> 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<string, Json> 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<JsonObjectEntry> object;

~Json();
const Json* find(std::string_view key) const;
};

Expand All @@ -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;
Expand Down
Loading