[PATCH] D141564: Remove a workaround for libstdc++4.8
Owen Anderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 19:16:57 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGafb613e9e7b7: Remove a workaround for libstdc++4.8 (authored by resistor).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141564/new/
https://reviews.llvm.org/D141564
Files:
llvm/include/llvm/Support/JSON.h
Index: llvm/include/llvm/Support/JSON.h
===================================================================
--- llvm/include/llvm/Support/JSON.h
+++ llvm/include/llvm/Support/JSON.h
@@ -193,10 +193,9 @@
void push_back(Value &&E);
template <typename... Args> void emplace_back(Args &&...A);
void pop_back();
- // FIXME: insert() takes const_iterator since C++11, old libstdc++ disagrees.
- iterator insert(iterator P, const Value &E);
- iterator insert(iterator P, Value &&E);
- template <typename It> iterator insert(iterator P, It A, It Z);
+ iterator insert(const_iterator P, const Value &E);
+ iterator insert(const_iterator P, Value &&E);
+ template <typename It> iterator insert(const_iterator P, It A, It Z);
template <typename... Args> iterator emplace(const_iterator P, Args &&...A);
friend bool operator==(const Array &L, const Array &R);
@@ -535,14 +534,14 @@
V.emplace_back(std::forward<Args>(A)...);
}
inline void Array::pop_back() { V.pop_back(); }
-inline typename Array::iterator Array::insert(iterator P, const Value &E) {
+inline typename Array::iterator Array::insert(const_iterator P, const Value &E) {
return V.insert(P, E);
}
-inline typename Array::iterator Array::insert(iterator P, Value &&E) {
+inline typename Array::iterator Array::insert(const_iterator P, Value &&E) {
return V.insert(P, std::move(E));
}
template <typename It>
-inline typename Array::iterator Array::insert(iterator P, It A, It Z) {
+inline typename Array::iterator Array::insert(const_iterator P, It A, It Z) {
return V.insert(P, A, Z);
}
template <typename... Args>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141564.488845.patch
Type: text/x-patch
Size: 1607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230113/28e06dfd/attachment.bin>
More information about the llvm-commits
mailing list