Skip to content

Commit 155a7d8

Browse files
authored
[Support] Add vector::erase to JSON::Array (#168835)
1 parent b3d1e92 commit 155a7d8

File tree

1 file changed

+2
-0
lines changed
  • llvm/include/llvm/Support

1 file changed

+2
-0
lines changed

llvm/include/llvm/Support/JSON.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ class Array {
205205
iterator insert(const_iterator P, Value &&E);
206206
template <typename It> iterator insert(const_iterator P, It A, It Z);
207207
template <typename... Args> iterator emplace(const_iterator P, Args &&...A);
208+
iterator erase(const_iterator P);
208209

209210
friend bool operator==(const Array &L, const Array &R);
210211
};
@@ -579,6 +580,7 @@ template <typename... Args>
579580
inline Array::iterator Array::emplace(const_iterator P, Args &&...A) {
580581
return V.emplace(P, std::forward<Args>(A)...);
581582
}
583+
inline Array::iterator Array::erase(const_iterator P) { return V.erase(P); }
582584
inline bool operator==(const Array &L, const Array &R) { return L.V == R.V; }
583585

584586
/// ObjectKey is a used to capture keys in Object. Like Value but:

0 commit comments

Comments
 (0)