[libcxx-commits] [libcxx] [libc++] Remove the constexpr `hash<vector<bool>>` extension (PR #132617)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 27 06:46:12 PDT 2025
================
@@ -64,13 +64,20 @@ Deprecations and Removals
- ``std::is_pod`` and ``std::is_pod_v`` are deprecated in C++20 and later.
+- libc++ no long adds ``constexpr`` to ``std::hash<std::vector<bool, A>>::operator()``. The ``constexpr`` addition
+ since C++20 was an unintended extension. The ``_LIBCPP_ENABLE_REMOVED_CONSTEXPR_HASH_VECTOR_BOOL`` macro can be
+ defined to temporarily re-enable this extension. This macro will be honored for one release and ignored starting in
+ LLVM 22.
+
Upcoming Deprecations and Removals
----------------------------------
LLVM 22
~~~~~~~
-- TODO
+- TODO: The ``constexpr`` addition to ``std::hash<std::vector<bool, A>>::operator()`` will be removed entirely, and the
+ ``_LIBCPP_ENABLE_REMOVED_CONSTEXPR_HASH_VECTOR_BOOL`` macro that was used to re-enable this extension will be ignored
+ in LLVM 22.
----------------
philnik777 wrote:
I don't think an escape hatch is necessary here. I don't expect that anybody actually relies on this. If it turns out there are people broken by this we can still add it.
https://github.com/llvm/llvm-project/pull/132617
More information about the libcxx-commits
mailing list