From 72b19a6a725809f872a7e7525c9a83bcbda85ec7 Mon Sep 17 00:00:00 2001 From: Stephan Hartmann 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 Commit-Queue: Stephan Hartmann Reviewed-by: Bartek Nowierski 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_;