You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chromium/chromium-80.0.3987.87-fix-f...

191 lines
8.4 KiB

5 years ago
diff -up chromium-80.0.3987.87/base/containers/flat_tree.h.c17 chromium-80.0.3987.87/base/containers/flat_tree.h
--- chromium-80.0.3987.87/base/containers/flat_tree.h.c17 2020-02-10 10:48:05.982500272 -0500
+++ chromium-80.0.3987.87/base/containers/flat_tree.h 2020-02-10 11:04:42.148507892 -0500
@@ -776,7 +776,11 @@ template <class Key, class Value, class
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::find(const K& key)
-> iterator {
+#ifdef __cpp_lib_as_const
+ return const_cast_it(std::as_const(*this).find(key));
+#else
return const_cast_it(as_const(*this).find(key));
+#endif
}
template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
@@ -799,7 +803,11 @@ template <class Key, class Value, class
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::equal_range(
const K& key) -> std::pair<iterator, iterator> {
+#ifdef __cpp_lib_as_const
+ auto res = std::as_const(*this).equal_range(key);
+#else
auto res = as_const(*this).equal_range(key);
+#endif
return {const_cast_it(res.first), const_cast_it(res.second)};
}
@@ -820,7 +828,11 @@ template <class Key, class Value, class
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::lower_bound(
const K& key) -> iterator {
+#ifdef __cpp_lib_as_const
+ return const_cast_it(std::as_const(*this).lower_bound(key));
+#else
return const_cast_it(as_const(*this).lower_bound(key));
+#endif
}
template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
@@ -841,7 +853,11 @@ template <class Key, class Value, class
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::upper_bound(
const K& key) -> iterator {
+#ifdef __cpp_lib_as_const
+ return const_cast_it(std::as_const(*this).upper_bound(key));
+#else
return const_cast_it(as_const(*this).upper_bound(key));
+#endif
}
template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
diff -up chromium-80.0.3987.106/third_party/webrtc/BUILD.gn.c17fix chromium-80.0.3987.106/third_party/webrtc/BUILD.gn
--- chromium-80.0.3987.106/third_party/webrtc/BUILD.gn.c17fix 2020-02-20 15:00:23.439563056 -0500
+++ chromium-80.0.3987.106/third_party/webrtc/BUILD.gn 2020-02-20 15:01:36.282355645 -0500
@@ -237,6 +237,10 @@ config("common_config") {
cflags_objc = []
defines = []
+ if (!is_clang) {
+ cflags_cc += [ "-std=c++17" ]
+ }
+
if (rtc_enable_protobuf) {
defines += [ "WEBRTC_ENABLE_PROTOBUF=1" ]
} else {
diff -up chromium-80.0.3987.106/third_party/abseil-cpp/BUILD.gn.c17fix chromium-80.0.3987.106/third_party/abseil-cpp/BUILD.gn
--- chromium-80.0.3987.106/third_party/abseil-cpp/BUILD.gn.c17fix 2020-02-21 15:12:14.413937754 -0500
+++ chromium-80.0.3987.106/third_party/abseil-cpp/BUILD.gn 2020-02-21 15:12:59.128967149 -0500
@@ -46,6 +46,10 @@ config("absl_default_cflags_cc") {
cflags_cc += [ "-Wbitfield-enum-conversion" ]
}
}
+ if (!is_clang) {
+ cflags_cc = [ "-std=c++17" ]
+ }
+
if (is_win) {
cflags_cc += [
"/wd4005", # macro-redefinition
diff -up chromium-80.0.3987.106/third_party/openscreen/src/tools/cddl/BUILD.gn.c17fix chromium-80.0.3987.106/third_party/openscreen/src/tools/cddl/BUILD.gn
--- chromium-80.0.3987.106/third_party/openscreen/src/tools/cddl/BUILD.gn.c17fix 2020-02-21 15:35:56.269180510 -0500
+++ chromium-80.0.3987.106/third_party/openscreen/src/tools/cddl/BUILD.gn 2020-02-21 15:42:12.718900742 -0500
@@ -22,6 +22,10 @@ if (current_toolchain == host_toolchain)
"../../third_party/abseil",
]
+ if (!is_clang) {
+ cflags_cc = [ "-std=c++17" ]
+ }
+
configs += [ "../../build:openscreen_include_dirs" ]
}
}
diff -up chromium-80.0.3987.106/build/config/compiler/BUILD.gn.c17hack chromium-80.0.3987.106/build/config/compiler/BUILD.gn
--- chromium-80.0.3987.106/build/config/compiler/BUILD.gn.c17hack 2020-02-21 16:09:22.871980103 -0500
+++ chromium-80.0.3987.106/build/config/compiler/BUILD.gn 2020-02-21 16:09:28.606856106 -0500
@@ -570,7 +570,7 @@ config("compiler") {
if (cxx11_override) {
cflags_cc += [ "-std=c++11" ]
} else {
- cflags_cc += [ "-std=c++14" ]
+ cflags_cc += [ "-std=c++17" ]
}
}
diff -up chromium-80.0.3987.106/third_party/openscreen/src/build/config/BUILD.gn.c17fix chromium-80.0.3987.106/third_party/openscreen/src/build/config/BUILD.gn
--- chromium-80.0.3987.106/third_party/openscreen/src/build/config/BUILD.gn.c17fix 2020-02-24 08:55:52.674819783 -0500
+++ chromium-80.0.3987.106/third_party/openscreen/src/build/config/BUILD.gn 2020-02-24 08:56:08.665466317 -0500
@@ -67,8 +67,8 @@ config("openscreen_code") {
"-fno-strict-aliasing", # See http://crbug.com/32204
]
- cflags_cc = [ "-std=c++14" ]
- cflags_objcc = [ "-std=c++14" ]
+ cflags_cc = [ "-std=c++17" ]
+ cflags_objcc = [ "-std=c++17" ]
ldflags = [ "-Werror" ]
diff -up chromium-80.0.3987.106/build/config/compiler/BUILD.gn.c17fix chromium-80.0.3987.106/build/config/compiler/BUILD.gn
--- chromium-80.0.3987.106/build/config/compiler/BUILD.gn.c17fix 2020-02-24 09:39:14.659536642 -0500
+++ chromium-80.0.3987.106/build/config/compiler/BUILD.gn 2020-02-24 09:39:23.098366657 -0500
@@ -553,7 +553,7 @@ config("compiler") {
# Override Chromium's default for projects that wish to stay on C++11.
cflags_cc += [ "-std=${standard_prefix}++11" ]
} else {
- cflags_cc += [ "-std=${standard_prefix}++14" ]
+ cflags_cc += [ "-std=${standard_prefix}++17" ]
}
} else if (!is_win && !is_nacl) {
if (target_os == "android") {
diff -up chromium-80.0.3987.106/third_party/openscreen/src/platform/api/task_runner.h.spot chromium-80.0.3987.106/third_party/openscreen/src/platform/api/task_runner.h
--- chromium-80.0.3987.106/third_party/openscreen/src/platform/api/task_runner.h.spot 2020-02-24 10:56:54.645126949 -0500
+++ chromium-80.0.3987.106/third_party/openscreen/src/platform/api/task_runner.h 2020-02-24 10:57:26.788407144 -0500
@@ -22,7 +22,7 @@ namespace platform {
// that A shall run before B.
class TaskRunner {
public:
- using Task = std::packaged_task<void() noexcept>;
+ using Task = std::packaged_task<void()>;
virtual ~TaskRunner() = default;
diff -up chromium-80.0.3987.106/base/containers/circular_deque.h.c17fix chromium-80.0.3987.106/base/containers/circular_deque.h
--- chromium-80.0.3987.106/base/containers/circular_deque.h.c17fix 2020-02-24 14:42:14.163076162 -0500
+++ chromium-80.0.3987.106/base/containers/circular_deque.h 2020-02-24 14:43:38.393120439 -0500
@@ -522,11 +522,19 @@ class circular_deque {
return buffer_[i - right_size];
}
value_type& at(size_type i) {
+#ifdef __cpp_lib_as_const
+ return const_cast<value_type&>(std::as_const(*this).at(i));
+#else
return const_cast<value_type&>(as_const(*this).at(i));
+#endif
}
value_type& operator[](size_type i) {
+#ifdef __cpp_lib_as_const
+ return const_cast<value_type&>(std::as_const(*this)[i]);
+#else
return const_cast<value_type&>(as_const(*this)[i]);
+#endif
}
const value_type& operator[](size_type i) const { return at(i); }
diff -up chromium-80.0.3987.106/device/bluetooth/bluetooth_adapter.cc.c17fix chromium-80.0.3987.106/device/bluetooth/bluetooth_adapter.cc
--- chromium-80.0.3987.106/device/bluetooth/bluetooth_adapter.cc.c17fix 2020-02-24 16:09:58.810502665 -0500
+++ chromium-80.0.3987.106/device/bluetooth/bluetooth_adapter.cc 2020-02-24 16:10:35.484705843 -0500
@@ -638,7 +638,7 @@ void BluetoothAdapter::RecordBluetoothDi
}
// static
-constexpr base::TimeDelta BluetoothAdapter::timeoutSec =
+const extern base::TimeDelta BluetoothAdapter::timeoutSec =
base::TimeDelta::FromSeconds(180);
} // namespace device
diff -up chromium-80.0.3987.122/content/browser/web_package/signed_exchange_prologue.cc.c17fix chromium-80.0.3987.122/content/browser/web_package/signed_exchange_prologue.cc
--- chromium-80.0.3987.122/content/browser/web_package/signed_exchange_prologue.cc.c17fix 2020-02-27 13:48:15.815885662 -0500
+++ chromium-80.0.3987.122/content/browser/web_package/signed_exchange_prologue.cc 2020-02-27 13:48:24.146711682 -0500
@@ -30,7 +30,7 @@ constexpr size_t kMaximumCBORHeaderLengt
namespace signed_exchange_prologue {
-constexpr size_t BeforeFallbackUrl::kEncodedSizeInBytes =
+const extern size_t BeforeFallbackUrl::kEncodedSizeInBytes =
sizeof(kSignedExchangeMagic) + kFallbackUrlLengthFieldSizeInBytes;
size_t Parse2BytesEncodedLength(base::span<const uint8_t> input) {