32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
From bd3af998439424886c641279b6f9bb6e950c7142 Mon Sep 17 00:00:00 2001
|
|
From: Stephan Hartmann <stha09@googlemail.com>
|
|
Date: Sun, 18 Dec 2022 16:12:29 +0000
|
|
Subject: [PATCH] GCC: make raw_ptr::operator bool constexpr
|
|
|
|
Required because autofill::internal::FormForest uses it in
|
|
a constexpr method.
|
|
|
|
Bug: 819294
|
|
Change-Id: Ib2258c9d98c2e7f88ad192b517b487f834a87481
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4110924
|
|
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
|
|
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
|
|
Cr-Commit-Position: refs/heads/main@{#1084785}
|
|
---
|
|
|
|
diff --git a/base/memory/raw_ptr.h b/base/memory/raw_ptr.h
|
|
index 4191f0e..a22f64b7 100644
|
|
--- a/base/memory/raw_ptr.h
|
|
+++ b/base/memory/raw_ptr.h
|
|
@@ -1301,7 +1301,9 @@
|
|
// possible, so use it only if absolutely necessary (e.g. for const_cast).
|
|
PA_ALWAYS_INLINE T* get() const { return GetForExtraction(); }
|
|
|
|
- explicit PA_ALWAYS_INLINE operator bool() const { return !!wrapped_ptr_; }
|
|
+ constexpr explicit PA_ALWAYS_INLINE operator bool() const {
|
|
+ return !!wrapped_ptr_;
|
|
+ }
|
|
|
|
template <typename U = T,
|
|
typename Unused = std::enable_if_t<
|