OSDN Git Service

[Support] Fix GCC compile after r336534
authorSam McCall <sam.mccall@gmail.com>
Mon, 9 Jul 2018 10:43:32 +0000 (10:43 +0000)
committerSam McCall <sam.mccall@gmail.com>
Mon, 9 Jul 2018 10:43:32 +0000 (10:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336537 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/JSON.h

index 640d302..767e25a 100644 (file)
@@ -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) {