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-105-raw_ptr-noexce...

31 lines
1.1 KiB

2 years ago
From 72b19a6a725809f872a7e7525c9a83bcbda85ec7 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Mon, 25 Jul 2022 09:19:19 +0000
Subject: [PATCH] GCC: make raw_ptr move assignment operator noexcept
Required in content::LevelDBScopesOptions, because move assignment
operator is noexcept too.
Bug: 3762913
Change-Id: Ic55ade0e15457eb7349fe24203307972d9030a8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3782669
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1027669}
---
diff --git a/base/memory/raw_ptr.h b/base/memory/raw_ptr.h
index 5d8c1cfd..9a62f03 100644
--- a/base/memory/raw_ptr.h
+++ b/base/memory/raw_ptr.h
@@ -796,7 +796,7 @@
return *this;
}
- ALWAYS_INLINE raw_ptr& operator=(raw_ptr&& p) {
+ ALWAYS_INLINE raw_ptr& operator=(raw_ptr&& p) noexcept {
if (LIKELY(this != &p)) {
Impl::ReleaseWrappedPtr(wrapped_ptr_);
wrapped_ptr_ = p.wrapped_ptr_;