Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Owners-Override | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
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.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |