diff options
-rw-r--r-- | llvm/include/llvm/Support/JSON.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/JSON.h b/llvm/include/llvm/Support/JSON.h index 640d302dfab..767e25a8dd2 100644 --- a/llvm/include/llvm/Support/JSON.h +++ b/llvm/include/llvm/Support/JSON.h @@ -163,11 +163,12 @@ public: V.emplace_back(std::forward<Args>(A)...); } void pop_back() { V.pop_back(); } - iterator insert(const_iterator P, const Value &E) { return V.insert(P, E); } - iterator insert(const_iterator P, Value &&E) { + // FIXME: insert() takes const_iterator since C++11, old libstdc++ disagrees. + iterator insert(iterator P, const Value &E) { return V.insert(P, E); } + iterator insert(iterator P, Value &&E) { return V.insert(P, std::move(E)); } - template <typename It> iterator insert(const_iterator P, It A, It Z) { + template <typename It> iterator insert(iterator P, It A, It Z) { return V.insert(P, A, Z); } template <typename... Args> iterator emplace(const_iterator P, Args &&... A) { |