Remove base::AlwaysFalse<> [chromium/src : main]

0 views
Skip to first unread message

Avi Drissman (Gerrit)

unread,
Aug 27, 2025, 3:59:08 PM (13 days ago) Aug 27
to Avi Drissman, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, grt+...@chromium.org, ipc-securi...@chromium.org, jessemcke...@google.com, jshin...@chromium.org, roblia...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Daniel Cheng

Avi Drissman added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Avi Drissman . resolved

OO-worthy?

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic0c9378483c9ad5cceb08bbb20a348a818ec5bd1
Gerrit-Change-Number: 6891176
Gerrit-PatchSet: 4
Gerrit-Owner: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Wed, 27 Aug 2025 19:59:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Aug 27, 2025, 5:39:41 PM (13 days ago) Aug 27
to Avi Drissman, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, grt+...@chromium.org, ipc-securi...@chromium.org, jessemcke...@google.com, jshin...@chromium.org, roblia...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Avi Drissman

Daniel Cheng voted and added 1 comment

Votes added by Daniel Cheng

Code-Review+1
Owners-Override+1

1 comment

Patchset-level comments
Daniel Cheng . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Avi Drissman
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic0c9378483c9ad5cceb08bbb20a348a818ec5bd1
Gerrit-Change-Number: 6891176
Gerrit-PatchSet: 4
Gerrit-Owner: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Avi Drissman <a...@chromium.org>
Gerrit-Comment-Date: Wed, 27 Aug 2025 21:39:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Avi Drissman (Gerrit)

unread,
Aug 27, 2025, 5:51:32 PM (13 days ago) Aug 27
to Avi Drissman, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, grt+...@chromium.org, ipc-securi...@chromium.org, jessemcke...@google.com, jshin...@chromium.org, roblia...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

Avi Drissman voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic0c9378483c9ad5cceb08bbb20a348a818ec5bd1
Gerrit-Change-Number: 6891176
Gerrit-PatchSet: 4
Gerrit-Owner: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Wed, 27 Aug 2025 21:51:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Aug 27, 2025, 5:54:36 PM (13 days ago) Aug 27
to Avi Drissman, Daniel Cheng, chromium...@chromium.org, grt+...@chromium.org, ipc-securi...@chromium.org, jessemcke...@google.com, jshin...@chromium.org, roblia...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
Remove base::AlwaysFalse<>

Since its introduction in 2011, `static_assert(false)` could not be used
in templates because it caused the code to be ill-formed. However,
sometimes you want to prohibit instantiation of a template with a
default parameter value, and force users to create specializations. The
usual workaround was to define an "always false" template. Chromium
followed that pattern with `base/types/always_false.h`.

Because this issue was one that widely affected the C++ community, in
2023 the C++ committee accepted P2593R1 to fix this problem. Later in
2023, a note about this fix was added to `always_false.h`.

However, the author of this note in `always_false.h` was mistaken. The
author believed that P2593R1 was accepted as part of C++23 (and thus
`base::AlwaysFalse<>` would need to be kept until Chromium adopted
C++23), but in fact the C++ committee had accepted and incorporated
P2593R1 as errata all the way back to C++11.

Because this errata has been widely implemented (Clang 17, GCC 13, and
MSVC 19.40), it is safe to remove the Chromium workaround.

See https://en.cppreference.com/w/cpp/language/static_assert.html and
its "defect reports" section.
Bug: none
Change-Id: Ic0c9378483c9ad5cceb08bbb20a348a818ec5bd1
Owners-Override: Daniel Cheng <dch...@chromium.org>
Reviewed-by: Daniel Cheng <dch...@chromium.org>
Commit-Queue: Avi Drissman <a...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1507382}
Files:
  • M base/BUILD.gn
  • M base/apple/bridging.h
  • M base/functional/bind_internal.h
  • M base/functional/callback.h
  • M base/strings/utf_string_conversions.h
  • M base/trace_event/memory_usage_estimator.h
  • D base/types/always_false.h
  • M base/types/variant_util.h
  • M base/win/scoped_gdi_object.h
  • M components/reporting/util/status_macros.h
  • M ipc/ipc_param_traits.h
  • M mojo/public/cpp/bindings/array_traits.h
  • M mojo/public/cpp/bindings/clone_traits.h
  • M mojo/public/cpp/bindings/enum_traits.h
  • M mojo/public/cpp/bindings/lib/template_util.h
  • M mojo/public/cpp/bindings/map_traits.h
  • M mojo/public/cpp/bindings/string_traits.h
  • M mojo/public/cpp/bindings/struct_traits.h
  • M mojo/public/cpp/bindings/union_traits.h
  • M ui/base/interaction/interactive_test_definitions.h
Change size: M
Delta: 20 files changed, 24 insertions(+), 97 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Daniel Cheng
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic0c9378483c9ad5cceb08bbb20a348a818ec5bd1
Gerrit-Change-Number: 6891176
Gerrit-PatchSet: 5
Gerrit-Owner: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages