Skip to content

Commit b16a0f3

Browse files
committed
Supply value_type typedef in json_arrayt for STL algorithm usage.
Some of the STL algorithms require the `value_type` typedef on containers. Adding this typedef allows these algorithms to be used with `json_arrayt`.
1 parent 8db6b22 commit b16a0f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/json.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ class json_arrayt:public jsont
169169
array.push_back(jsont());
170170
return array.back();
171171
}
172+
173+
typedef jsont value_type; // NOLINT(readability/identifiers)
172174
};
173175

174176
class json_stringt:public jsont

0 commit comments

Comments
 (0)