Summary: Add a pop_back() function to dynamic arrays.
Test Plan: - used it
Reviewed By: delong.j@fb.com
FB internal diff:
D569440
array.push_back(std::move(v));
}
+inline void dynamic::pop_back() {
+ auto& array = get<Array>();
+ array.pop_back();
+}
+
inline std::size_t dynamic::hash() const {
switch (type()) {
case OBJECT:
void push_back(dynamic const&);
void push_back(dynamic&&);
+ /*
+ * Remove an element from the back of an array. If this is not an array,
+ * throws TypeError.
+ *
+ * Does not invalidate iterators.
+ */
+ void pop_back();
+
/*
* Get a hash code. This function is called by a std::hash<>
* specialization, also.